summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-06-23 09:09:15 +0000
committerJay Foad <jay.foad@gmail.com>2011-06-23 09:09:15 +0000
commit61ea0e469254e0c7ab0e190b463d994b9316846c (patch)
tree4a3a7f1235a5366dc6d5c41a4edf7b8b86b15b87 /llvm/lib/Transforms/Utils/CloneFunction.cpp
parent25fbb92320fac0a9982d03cc1b00973440d4d475 (diff)
downloadbcm5719-llvm-61ea0e469254e0c7ab0e190b463d994b9316846c.tar.gz
bcm5719-llvm-61ea0e469254e0c7ab0e190b463d994b9316846c.zip
Reinstate r133513 (reverted in r133700) with an additional fix for a
-Wshorten-64-to-32 warning in Instructions.h. llvm-svn: 133708
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