summaryrefslogtreecommitdiff
path: root/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
commit95c3e48f9557adb6064d580684bb14cacec2f826 (patch)
tree377049dc513cb4332763e8da894cc3e7aa7ec72e /lib/Transforms/Utils/CloneFunction.cpp
parent5b46e8e6b82226810d0d6440b7b5fb05e68df5e8 (diff)
downloadllvm-95c3e48f9557adb6064d580684bb14cacec2f826.tar.gz
llvm-95c3e48f9557adb6064d580684bb14cacec2f826.tar.bz2
llvm-95c3e48f9557adb6064d580684bb14cacec2f826.tar.xz
Reinstate r133513 (reverted in r133700) with an additional fix for a
-Wshorten-64-to-32 warning in Instructions.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133708 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--lib/Transforms/Utils/CloneFunction.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp
index d967ceb968..561b69dd1e 100644
--- a/lib/Transforms/Utils/CloneFunction.cpp
+++ b/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();