all: add type parameter to CreateCall

This uses LLVMBuildCall2 in the background, which is the replacement for
the deprecated LLVMBuildCall function.
This commit is contained in:
Ayke van Laethem
2022-09-21 00:37:01 +02:00
committed by Ron Evans
parent b79bf29c11
commit 6bc6de8f82
26 changed files with 123 additions and 103 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ func OptimizeReflectImplements(mod llvm.Module) {
// Replace Implements call with the type assert call.
builder.SetInsertPointBefore(call)
implements := builder.CreateCall(typeAssertFunction, []llvm.Value{
implements := builder.CreateCall(typeAssertFunction.GlobalValueType(), typeAssertFunction, []llvm.Value{
builder.CreatePtrToInt(call.Operand(0), uintptrType, ""), // typecode to check
}, "")
call.ReplaceAllUsesWith(implements)