iron-kaleidoscope
iron-kaleidoscope copied to clipboard
LLVM ERROR when using defined function more than once.
When I define a function and try to use it multiple times, LLVM has an error and the program crashes.
Example:
> def double(x) x * 2
define double @double(double %x) {
entry:
%multmp = fmul double %x, 2.000000e+00
ret double %multmp
}
> double(4)
=> 8
> double(5)
LLVM ERROR: Program used external function '_double' which could not be resolved!
This appears to be an issue in my own codebase and the code found in the chapters in this repository, I am using code from chapter 5.