diff --git a/src/coreclr/jit/importercalls.cpp b/src/coreclr/jit/importercalls.cpp index 19828948dc2dff..69ab1b84e5192b 100644 --- a/src/coreclr/jit/importercalls.cpp +++ b/src/coreclr/jit/importercalls.cpp @@ -4303,7 +4303,7 @@ GenTree* Compiler::impTransformThis(GenTree* thisPtr, bool Compiler::impCanPInvokeInline() { - return getInlinePInvokeEnabled() && (!opts.compDbgCode) && (compCodeOpt() != SMALL_CODE) && + return getInlinePInvokeEnabled() && opts.OptimizationEnabled() && (compCodeOpt() != SMALL_CODE) && (!opts.compNoPInvokeInlineCB) // profiler is preventing inline pinvoke ; }