aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2023-01-13 01:12:07 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2023-01-13 01:18:56 +0300
commitfbcefff9d0a3f5e97270ef8e7b8e0f2afc33dc1c (patch)
treedc0456f81b671ab1f775c02910382e890a7e82e2 /llvm/lib/Transforms/Utils/Local.cpp
parent80246b22a62140fd30131bee571d7fd84d2e2522 (diff)
downloadllvm-fbcefff9d0a3f5e97270ef8e7b8e0f2afc33dc1c.zip
llvm-fbcefff9d0a3f5e97270ef8e7b8e0f2afc33dc1c.tar.gz
llvm-fbcefff9d0a3f5e97270ef8e7b8e0f2afc33dc1c.tar.bz2
Revert "[SimplifyCFG] When eliminating `unreachable` landing pads, mark `call`s as `nounwind`"
The bool is in the wrong place and might get implicitly converted from the previous second argument - a pointer. Thinking about it more, it's not really the best place for that functionality anyways, only a single caller needs that. This reverts commit 3c5b1f2d94d021005ce3769a4402d4a4ae843989.
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 569eee3..d5d0232 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -2557,14 +2557,11 @@ static bool markAliveBlocks(Function &F,
return Changed;
}
-void llvm::removeUnwindEdge(BasicBlock *BB, bool WouldUnwindBeUB,
- DomTreeUpdater *DTU) {
+void llvm::removeUnwindEdge(BasicBlock *BB, DomTreeUpdater *DTU) {
Instruction *TI = BB->getTerminator();
if (auto *II = dyn_cast<InvokeInst>(TI)) {
- CallInst *CI = changeToCall(II, DTU);
- if (WouldUnwindBeUB && !CI->doesNotThrow())
- CI->setDoesNotThrow();
+ changeToCall(II, DTU);
return;
}