aboutsummaryrefslogtreecommitdiffhomepage
path: root/transform/rtcalls.go
diff options
context:
space:
mode:
Diffstat (limited to 'transform/rtcalls.go')
-rw-r--r--transform/rtcalls.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/transform/rtcalls.go b/transform/rtcalls.go
index 2f17f815b..d70bc6263 100644
--- a/transform/rtcalls.go
+++ b/transform/rtcalls.go
@@ -149,7 +149,7 @@ func OptimizeReflectImplements(mod llvm.Module) {
interfaceType := interfaceTypeBitCast.Operand(0)
if strings.HasPrefix(interfaceType.Name(), "reflect/types.type:named:") {
// Get the underlying type.
- interfaceType = llvm.ConstExtractValue(interfaceType.Initializer(), []uint32{0})
+ interfaceType = builder.CreateExtractValue(interfaceType.Initializer(), 0, "")
}
if !strings.HasPrefix(interfaceType.Name(), "reflect/types.type:interface:") {
// This is an error. The Type passed to Implements should be of
@@ -161,7 +161,7 @@ func OptimizeReflectImplements(mod llvm.Module) {
// Interface is unknown at compile time. This can't be optimized.
continue
}
- typeAssertFunction := llvm.ConstExtractValue(interfaceType.Initializer(), []uint32{4}).Operand(0)
+ typeAssertFunction := builder.CreateExtractValue(interfaceType.Initializer(), 4, "").Operand(0)
// Replace Implements call with the type assert call.
builder.SetInsertPointBefore(call)