From e6d5418a90acf5beeb7fd9f3ff01e7c754cf00ee Mon Sep 17 00:00:00 2001 From: Egor Bogatov Date: Fri, 9 Aug 2019 12:55:50 +0300 Subject: [PATCH] fix inlining Commit migrated from https://github.com/mono/mono/commit/a7e428d82f3042960e42a638e26afe73b1381eda --- src/mono/mono/mini/method-to-ir.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mono/mono/mini/method-to-ir.c b/src/mono/mono/mini/method-to-ir.c index ff00d7d..6b11d82 100644 --- a/src/mono/mono/mini/method-to-ir.c +++ b/src/mono/mono/mini/method-to-ir.c @@ -3908,9 +3908,11 @@ mono_method_check_inlining (MonoCompile *cfg, MonoMethod *method) if (mono_profiler_coverage_instrumentation_enabled (method)) return FALSE; -#if ENABLE_NETCORE - if (!cfg->ret_var_set) +#ifdef ENABLE_NETCORE + if (m_class_get_image (method->klass) == mono_defaults.corlib && + !strcmp (m_class_get_name (method->klass), "ThrowHelper")) { return FALSE; + } #endif return TRUE; -- 2.7.4