From 7ed37b3881542a82f8fc937896ecd16720f4048a Mon Sep 17 00:00:00 2001 From: xushiwei Date: Thu, 2 May 2024 11:29:29 +0800 Subject: [PATCH] CreateExtractValue --- z_llvmext.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/z_llvmext.go b/z_llvmext.go index e498815..611ae1d 100644 --- a/z_llvmext.go +++ b/z_llvmext.go @@ -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