diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index a235158..9e04839 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -5184,7 +5184,9 @@ bool SimplifyCFGOpt::simplifyUnreachable(UnreachableInst *UI) { DTU->applyUpdates(Updates); Updates.clear(); } - removeUnwindEdge(TI->getParent(), DTU); + auto *CI = cast<CallInst>(removeUnwindEdge(TI->getParent(), DTU)); + if (!CI->doesNotThrow()) + CI->setDoesNotThrow(); Changed = true; } } else if (auto *CSI = dyn_cast<CatchSwitchInst>(TI)) { |