diff options
author | Eric Christopher <echristo@apple.com> | 2011-06-23 06:24:52 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-06-23 06:24:52 +0000 |
commit | e59fbc04ad343435705c28b3cf7038d65fe4af0a (patch) | |
tree | de60ed61fbcf709dcb98640d69286b949d71c0d6 /lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | 4c0c446d7458ffcfbe108ea71f1915f387e150e7 (diff) |
Revert r133513:
"Reinstate r133435 and r133449 (reverted in r133499) now that the clang
self-hosted build failure has been fixed (r133512)."
Due to some additional warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133700 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r-- | lib/Transforms/Utils/BasicBlockUtils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/BasicBlockUtils.cpp b/lib/Transforms/Utils/BasicBlockUtils.cpp index b4f74f97e9..92464e8cf1 100644 --- a/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -153,13 +153,13 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, Pass *P) { // Delete the unconditional branch from the predecessor... PredBB->getInstList().pop_back(); + // Move all definitions in the successor to the predecessor... + PredBB->getInstList().splice(PredBB->end(), BB->getInstList()); + // Make all PHI nodes that referred to BB now refer to Pred as their // source... BB->replaceAllUsesWith(PredBB); - // Move all definitions in the successor to the predecessor... - PredBB->getInstList().splice(PredBB->end(), BB->getInstList()); - // Inherit predecessors name if it exists. if (!PredBB->hasName()) PredBB->takeName(BB); |