diff options
author | Ayke van Laethem <[email protected]> | 2022-09-21 00:37:01 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2022-10-19 22:23:19 +0200 |
commit | 6bc6de8f829786e84e01b97d1f452505a83047b1 (patch) | |
tree | bf90f4942d2aa881521b77734a07acaf0b8b411d /interp | |
parent | b79bf29c110191140b2f9ac0b1085127d66c36c7 (diff) | |
download | tinygo-6bc6de8f829786e84e01b97d1f452505a83047b1.tar.gz tinygo-6bc6de8f829786e84e01b97d1f452505a83047b1.zip |
all: add type parameter to CreateCall
This uses LLVMBuildCall2 in the background, which is the replacement for
the deprecated LLVMBuildCall function.
Diffstat (limited to 'interp')
-rw-r--r-- | interp/interp.go | 2 | ||||
-rw-r--r-- | interp/interpreter.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/interp/interp.go b/interp/interp.go index a1f5f507a..856f08b18 100644 --- a/interp/interp.go +++ b/interp/interp.go @@ -127,7 +127,7 @@ func Run(mod llvm.Module, timeout time.Duration, debug bool) error { // Create a call to the package initializer (which was // previously deleted). i8undef := llvm.Undef(r.i8ptrType) - r.builder.CreateCall(fn, []llvm.Value{i8undef}, "") + r.builder.CreateCall(fn.GlobalValueType(), fn, []llvm.Value{i8undef}, "") // Make sure that any globals touched by the package // initializer, won't be accessed by later package initializers. err := r.markExternalLoad(fn) diff --git a/interp/interpreter.go b/interp/interpreter.go index 7cee14bf4..4a4553f88 100644 --- a/interp/interpreter.go +++ b/interp/interpreter.go @@ -977,7 +977,7 @@ func (r *runner) runAtRuntime(fn *function, inst instruction, locals []value, me } } } - result = r.builder.CreateCall(llvmFn, args, inst.name) + result = r.builder.CreateCall(inst.llvmInst.CalledFunctionType(), llvmFn, args, inst.name) case llvm.Load: err := mem.markExternalLoad(operands[0]) if err != nil { |