summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-06-21 10:33:19 +0000
committerJay Foad <jay.foad@gmail.com>2011-06-21 10:33:19 +0000
commita97a2c998e1b6c59e58d53c8ee29082901248786 (patch)
treec6d5b9c218256cc4c2e3116c63c6e79d8ab86797 /llvm/lib/Transforms/Utils/CloneFunction.cpp
parent25127ab1e4d1a68f26943c3a87c9cf26fca82e8f (diff)
downloadbcm5719-llvm-a97a2c998e1b6c59e58d53c8ee29082901248786.tar.gz
bcm5719-llvm-a97a2c998e1b6c59e58d53c8ee29082901248786.zip
Reinstate r133435 and r133449 (reverted in r133499) now that the clang
self-hosted build failure has been fixed (r133512). llvm-svn: 133513
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index d967ceb9685..561b69dd1ee 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -572,12 +572,12 @@ void llvm::CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
// removed, so we just need to splice the blocks.
BI->eraseFromParent();
- // Move all the instructions in the succ to the pred.
- I->getInstList().splice(I->end(), Dest->getInstList());
-
// Make all PHI nodes that referred to Dest now refer to I as their source.
Dest->replaceAllUsesWith(I);
+ // Move all the instructions in the succ to the pred.
+ I->getInstList().splice(I->end(), Dest->getInstList());
+
// Remove the dest block.
Dest->eraseFromParent();
OpenPOWER on IntegriCloud