diff options
author | Damian Gryski <[email protected]> | 2023-03-14 17:18:09 -0700 |
---|---|---|
committer | Ron Evans <[email protected]> | 2023-03-19 17:45:43 +0100 |
commit | e0329b25debea034e9b4e2a9d46806d9388a757b (patch) | |
tree | 4351a1515953e96ed21242c553e621ea1907a4ab /transform/rtcalls.go | |
parent | 229f479a7dab1358f0fd4abecb20751430f56103 (diff) | |
download | tinygo-e0329b25debea034e9b4e2a9d46806d9388a757b.tar.gz tinygo-e0329b25debea034e9b4e2a9d46806d9388a757b.zip |
transform: fix OptimizeReflectImplements pass for new named elem offset
Diffstat (limited to 'transform/rtcalls.go')
-rw-r--r-- | transform/rtcalls.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/transform/rtcalls.go b/transform/rtcalls.go index b7192ad4f..36d2853b6 100644 --- a/transform/rtcalls.go +++ b/transform/rtcalls.go @@ -142,7 +142,7 @@ func OptimizeReflectImplements(mod llvm.Module) { if strings.HasPrefix(interfaceType.Name(), "reflect/types.type:named:") { // Get the underlying type. - interfaceType = stripPointerCasts(builder.CreateExtractValue(interfaceType.Initializer(), 2, "")) + interfaceType = stripPointerCasts(builder.CreateExtractValue(interfaceType.Initializer(), 3, "")) } if !strings.HasPrefix(interfaceType.Name(), "reflect/types.type:interface:") { // This is an error. The Type passed to Implements should be of |