Skip to content

Commit

Permalink
Merge pull request #7 from xushiwei/q
Browse files Browse the repository at this point in the history
CreateCall
  • Loading branch information
xushiwei authored Apr 18, 2024
2 parents 718cc88 + 91a8927 commit 6233231
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions z_llvmext.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,9 @@ func CreateLoad(b Builder, t Type, p Value) (v Value) {
v.C = C.LLVMBuildLoad2(b.C, t.C, p.C, &emptyCStr[0])
return
}

func CreateCall(b Builder, t Type, fn Value, args []Value) (v Value) {
ptr, nvals := llvmValueRefs(args)
v.C = C.LLVMBuildCall2(b.C, t.C, fn.C, ptr, nvals, &emptyCStr[0])
return
}

0 comments on commit 6233231

Please sign in to comment.