Fix PInvoke Inline decision (#8975)
authorMichelle McDaniel <adiaaida@gmail.com>
Thu, 19 Jan 2017 04:57:50 +0000 (20:57 -0800)
committerJan Kotas <jkotas@microsoft.com>
Thu, 19 Jan 2017 04:57:50 +0000 (20:57 -0800)
Originally, the condition was !impCanPInvokeInline, but when change
1e63ca0 pulled out impCanPInvokeInlineCall, the condition was flipped.
This was exposed by an internal debugger test.

Fixes DevDiv 366669.

src/jit/importer.cpp

index 1d9144b..026628d 100644 (file)
@@ -5582,7 +5582,7 @@ void Compiler::impCheckForPInvokeCall(
         // profitability checks
         if (!(opts.jitFlags->IsSet(JitFlags::JIT_FLAG_IL_STUB) && IsTargetAbi(CORINFO_CORERT_ABI)))
         {
-            if (impCanPInvokeInline())
+            if (!impCanPInvokeInline())
             {
                 return;
             }