diff options
author | Dan Gohman <gohman@apple.com> | 2010-01-05 17:50:58 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-01-05 17:50:58 +0000 |
commit | ba25f0924ef3be887fb67ed6a66f3dee77461f44 (patch) | |
tree | 979c645b58f6ceb5fda7f0e4987035ae246d3c55 /lib/Transforms/Utils | |
parent | f0fd3afeffcb41202147f755bf770061f189a42b (diff) | |
download | external_llvm-ba25f0924ef3be887fb67ed6a66f3dee77461f44.zip external_llvm-ba25f0924ef3be887fb67ed6a66f3dee77461f44.tar.gz external_llvm-ba25f0924ef3be887fb67ed6a66f3dee77461f44.tar.bz2 |
Nick Lewycky pointed out that this code makes changes unconditionally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92739 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r-- | lib/Transforms/Utils/Local.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 30fe802..1a7d27a 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -328,7 +328,8 @@ llvm::RecursivelyDeleteDeadPHINode(PHINode *PN) { if (!PHIs.insert(cast<PHINode>(JP))) { // Break the cycle and delete the PHI and its operands. JP->replaceAllUsesWith(UndefValue::get(JP->getType())); - Changed |= RecursivelyDeleteTriviallyDeadInstructions(JP); + (void)RecursivelyDeleteTriviallyDeadInstructions(JP); + Changed = true; break; } return Changed; |