diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index a1a638b0c2c..9735a2fcda4 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -69,10 +69,11 @@ static void HandleInlinedInvoke(InvokeInst *II, BasicBlock *FirstNewBlock, if (!isa(I)) continue; CallInst *CI = cast(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(CI->getCalledValue())) continue; // Convert this function call into an invoke instruction.