diff options
author | Ayke van Laethem <[email protected]> | 2022-09-20 23:59:22 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2022-10-19 22:23:19 +0200 |
commit | b79bf29c110191140b2f9ac0b1085127d66c36c7 (patch) | |
tree | 28d1602d08eab2cb0f2aa92f3ead1c5add640b13 /compiler/interface.go | |
parent | 65d65c131345e47581835e76df5fd22fced15158 (diff) | |
download | tinygo-b79bf29c110191140b2f9ac0b1085127d66c36c7.tar.gz tinygo-b79bf29c110191140b2f9ac0b1085127d66c36c7.zip |
compiler: return a FunctionType (not a PointerType) in getRawFuncType
This is necessary for opaque pointer support (in LLVM 15).
Diffstat (limited to 'compiler/interface.go')
-rw-r--r-- | compiler/interface.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/interface.go b/compiler/interface.go index c59a9ade1..b0ea71e3f 100644 --- a/compiler/interface.go +++ b/compiler/interface.go @@ -465,7 +465,7 @@ func (c *compilerContext) getInvokeFunction(instr *ssa.CallCommon) llvm.Value { paramTuple = append(paramTuple, sig.Params().At(i)) } paramTuple = append(paramTuple, types.NewVar(token.NoPos, nil, "$typecode", types.Typ[types.Uintptr])) - llvmFnType := c.getRawFuncType(types.NewSignature(sig.Recv(), types.NewTuple(paramTuple...), sig.Results(), false)).ElementType() + llvmFnType := c.getRawFuncType(types.NewSignature(sig.Recv(), types.NewTuple(paramTuple...), sig.Results(), false)) llvmFn = llvm.AddFunction(c.mod, fnName, llvmFnType) c.addStandardDeclaredAttributes(llvmFn) llvmFn.AddFunctionAttr(c.ctx.CreateStringAttribute("tinygo-invoke", c.getMethodSignatureName(instr.Method))) |