summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-05-29 03:01:09 +0000
committerJohn McCall <rjmccall@apple.com>2011-05-29 03:01:09 +0000
commita6d7345ec91e4b07671f62d231e7c42f054bc70d (patch)
tree67beb2c321846144a015afd51cc0b8c98b15ecb6
parent01eaf907b09828ed9fc497d7a8d48192e486849b (diff)
downloadllvm-a6d7345ec91e4b07671f62d231e7c42f054bc70d.tar.gz
llvm-a6d7345ec91e4b07671f62d231e7c42f054bc70d.tar.bz2
llvm-a6d7345ec91e4b07671f62d231e7c42f054bc70d.tar.xz
Fix this to work correctly with phis; test case to follow if this successfully
fixes self-host. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132275 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Utils/InlineFunction.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp
index 2f3c045ea5..d2fd07aed1 100644
--- a/lib/Transforms/Utils/InlineFunction.cpp
+++ b/lib/Transforms/Utils/InlineFunction.cpp
@@ -189,6 +189,7 @@ BasicBlock *InvokeInliningInfo::getInnerUnwindDest() {
PHINode *innerPhi = PHINode::Create(outerPhi->getType(), phiCapacity,
outerPhi->getName() + ".lpad-body",
insertPoint);
+ outerPhi->replaceAllUsesWith(innerPhi);
innerPhi->addIncoming(outerPhi, OuterUnwindDest);
}