aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r--lib/Transforms/Utils/Local.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp
index 27d9a06bfc..30fe802513 100644
--- a/lib/Transforms/Utils/Local.cpp
+++ b/lib/Transforms/Utils/Local.cpp
@@ -278,7 +278,7 @@ bool llvm::RecursivelyDeleteTriviallyDeadInstructions(Value *V) {
SmallVector<Instruction*, 16> DeadInsts;
DeadInsts.push_back(I);
- while (!DeadInsts.empty()) {
+ do {
I = DeadInsts.pop_back_val();
// Null out all of the instruction's operands to see if any operand becomes
@@ -298,7 +298,7 @@ bool llvm::RecursivelyDeleteTriviallyDeadInstructions(Value *V) {
}
I->eraseFromParent();
- }
+ } while (!DeadInsts.empty());
return true;
}