summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--]src/jit/_typeinfo.h7
-rwxr-xr-x[-rw-r--r--]src/jit/importer.cpp2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/jit/_typeinfo.h b/src/jit/_typeinfo.h
index c71294a8b8..2e04343b3c 100644..100755
--- a/src/jit/_typeinfo.h
+++ b/src/jit/_typeinfo.h
@@ -555,6 +555,13 @@ public:
return m_method;
}
+ // If FEATURE_CORECLR is enabled, GetMethod can be called
+ // before the pointer type is known to be a method pointer type.
+ CORINFO_METHOD_HANDLE GetMethod2() const
+ {
+ return m_method;
+ }
+
// Get this item's type
// If primitive, returns the primitive type (TI_*)
// If not primitive, returns:
diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp
index 52604b5136..52a7a7148e 100644..100755
--- a/src/jit/importer.cpp
+++ b/src/jit/importer.cpp
@@ -11610,7 +11610,7 @@ DO_LDFTN:
#ifdef FEATURE_CORECLR
// In coreclr the delegate transparency rule needs to be enforced even if verification is disabled
typeInfo tiActualFtn = impStackTop(0).seTypeInfo;
- CORINFO_METHOD_HANDLE delegateMethodHandle = tiActualFtn.GetMethod();
+ CORINFO_METHOD_HANDLE delegateMethodHandle = tiActualFtn.GetMethod2();
impInsertCalloutForDelegate(info.compMethodHnd,
delegateMethodHandle,