Fix PR1335 and Transforms/Inline/2007-04-15-InlineEH.ll
authorChris Lattner <sabre@nondot.org>
Sun, 15 Apr 2007 21:38:06 +0000 (21:38 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 15 Apr 2007 21:38:06 +0000 (21:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36090 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/InlineFunction.cpp

index a1a638b0c2c3ff89d652ca0465b3bf5a6bdc023e..9735a2fcda444b0502fbfd83cc6f5cc5b69a47b6 100644 (file)
@@ -69,10 +69,11 @@ static void HandleInlinedInvoke(InvokeInst *II, BasicBlock *FirstNewBlock,
           if (!isa<CallInst>(I)) continue;
           CallInst *CI = cast<CallInst>(I);
 
-          // If this is an intrinsic function call, don't convert it to an
-          // invoke.
-          if (CI->getCalledFunction() &&
-              CI->getCalledFunction()->getIntrinsicID())
+          // If this is an intrinsic function call or an inline asm, don't
+          // convert it to an invoke.
+          if ((CI->getCalledFunction() &&
+               CI->getCalledFunction()->getIntrinsicID()) ||
+              isa<InlineAsm>(CI->getCalledValue()))
             continue;
           
           // Convert this function call into an invoke instruction.