diff options
author | Tanner Gooding <tagoo@outlook.com> | 2019-04-30 19:00:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 19:00:44 -0700 |
commit | 07b3afc27304800f00975c8fd4836b319aaa8820 (patch) | |
tree | 1bc0adcea5fb0639bd8a3111c6651ebdbeaedf86 /src/jit/importer.cpp | |
parent | 7a24a538cd265993e5864179f51781398c28ecdf (diff) | |
download | coreclr-07b3afc27304800f00975c8fd4836b319aaa8820.tar.gz coreclr-07b3afc27304800f00975c8fd4836b319aaa8820.tar.bz2 coreclr-07b3afc27304800f00975c8fd4836b319aaa8820.zip |
Updating lookupNamedIntrinsic to no longer assert for an unexpected hwintrinsic method. (#24327)
Diffstat (limited to 'src/jit/importer.cpp')
-rw-r--r-- | src/jit/importer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index d49300118c..05eb086fdf 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -4347,11 +4347,14 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method) #else // !defined(_TARGET_XARCH_) && !defined(_TARGET_ARM64_) #error Unsupported platform #endif // !defined(_TARGET_XARCH_) && !defined(_TARGET_ARM64_) - else + else if (strcmp(methodName, "get_IsSupported") == 0) { - assert(strcmp(methodName, "get_IsSupported") == 0); return NI_IsSupported_False; } + else + { + return gtIsRecursiveCall(method) ? NI_Throw_PlatformNotSupportedException : NI_Illegal; + } } #endif // FEATURE_HW_INTRINSICS |