File tree 1 file changed +5
-3
lines changed 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,9 @@ func OptimizeStringEqual(mod llvm.Module) {
117
117
// As of this writing, the (reflect.Type).Interface method has not yet been
118
118
// implemented so this optimization is critical for the encoding/json package.
119
119
func OptimizeReflectImplements (mod llvm.Module ) {
120
- implementsSignature := mod .NamedGlobal ("reflect/methods.Implements(reflect.Type) bool" )
121
- if implementsSignature .IsNil () {
120
+ implementsSignature1 := mod .NamedGlobal ("reflect/methods.Implements(reflect.Type) bool" )
121
+ implementsSignature2 := mod .NamedGlobal ("reflect/methods.Implements(internal/reflectlite.Type) bool" )
122
+ if implementsSignature1 .IsNil () && implementsSignature2 .IsNil () {
122
123
return
123
124
}
124
125
@@ -132,7 +133,8 @@ func OptimizeReflectImplements(mod llvm.Module) {
132
133
if attr .IsNil () {
133
134
continue
134
135
}
135
- if attr .GetStringValue () == "reflect/methods.Implements(reflect.Type) bool" {
136
+ val := attr .GetStringValue ()
137
+ if val == "reflect/methods.Implements(reflect.Type) bool" || val == "reflect/methods.Implements(internal/reflectlite.Type) bool" {
136
138
implementsFunc = fn
137
139
break
138
140
}
You can’t perform that action at this time.
0 commit comments