Skip to content

Commit

Permalink
CreateExtractValue
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed May 2, 2024
1 parent 06c2c62 commit 7ed37b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions z_llvmext.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ func CreateStructGEP(b Builder, t Type, p Value, i int) (v Value) {
return
}

func CreateExtractValue(b Builder, agg Value, i int) (v Value) {
v.C = C.LLVMBuildExtractValue(b.C, agg.C, C.unsigned(i), &emptyCStr[0])
return
}

func CreateLoad(b Builder, t Type, p Value) (v Value) {
v.C = C.LLVMBuildLoad2(b.C, t.C, p.C, &emptyCStr[0])
return
Expand Down

0 comments on commit 7ed37b3

Please sign in to comment.