diff options
Diffstat (limited to 'llvm/lib/CodeGen/WinEHPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/WinEHPrepare.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp index 041fb7b..28efee0 100644 --- a/llvm/lib/CodeGen/WinEHPrepare.cpp +++ b/llvm/lib/CodeGen/WinEHPrepare.cpp @@ -949,10 +949,14 @@ void WinEHPrepare::removeImplausibleInstructions(Function &F) { continue; // Skip call sites which are nounwind intrinsics or inline asm. + // + // FIXME: Should this check isIntrinsic() instead of + // hasLLVMReservedName? The latter is conservative. auto *CalledFn = dyn_cast<Function>(CS.getCalledValue()->stripPointerCasts()); - if (CalledFn && ((CalledFn->isIntrinsic() && CS.doesNotThrow()) || - CS.isInlineAsm())) + if (CalledFn && + ((CalledFn->hasLLVMReservedName() && CS.doesNotThrow()) || + CS.isInlineAsm())) continue; // This call site was not part of this funclet, remove it. |