Skip to content

Commit

Permalink
Merge pull request #13 from xushiwei/q
Browse files Browse the repository at this point in the history
CreateExtractValue
  • Loading branch information
xushiwei authored May 2, 2024
2 parents 06c2c62 + 7ed37b3 commit f17514e
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 f17514e

Please sign in to comment.