mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 20:14:04 +00:00
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:
committed by
Ron Evans
parent
b79bf29c11
commit
6bc6de8f82
@@ -55,7 +55,7 @@ func (b *builder) createMemoryCopyImpl() {
|
||||
params = append(params, b.getValue(param))
|
||||
}
|
||||
params = append(params, llvm.ConstInt(b.ctx.Int1Type(), 0, false))
|
||||
b.CreateCall(llvmFn, params, "")
|
||||
b.CreateCall(llvmFn.GlobalValueType(), llvmFn, params, "")
|
||||
b.CreateRetVoid()
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ func (b *builder) createMemoryZeroImpl() {
|
||||
b.getValue(b.fn.Params[1]),
|
||||
llvm.ConstInt(b.ctx.Int1Type(), 0, false),
|
||||
}
|
||||
b.CreateCall(llvmFn, params, "")
|
||||
b.CreateCall(llvmFn.GlobalValueType(), llvmFn, params, "")
|
||||
b.CreateRetVoid()
|
||||
}
|
||||
|
||||
@@ -119,6 +119,6 @@ func (b *builder) defineMathOp() {
|
||||
for i, param := range b.fn.Params {
|
||||
args[i] = b.getValue(param)
|
||||
}
|
||||
result := b.CreateCall(llvmFn, args, "")
|
||||
result := b.CreateCall(llvmFn.GlobalValueType(), llvmFn, args, "")
|
||||
b.CreateRet(result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user