projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
757e75b
)
In "empty" bb, the return instruction may not be first instruction, if dbg value...
author
Devang Patel
<dpatel@apple.com>
Mon, 15 Mar 2010 19:05:46 +0000
(19:05 +0000)
committer
Devang Patel
<dpatel@apple.com>
Mon, 15 Mar 2010 19:05:46 +0000
(19:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98565
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/SimplifyCFGPass.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/SimplifyCFGPass.cpp
b/lib/Transforms/Scalar/SimplifyCFGPass.cpp
index 952d1a8ffb84ef18be2f08c353440f7af397af71..738c5e8d13d1dd41ab9de95209855b15a6d8d89c 100644
(file)
--- a/
lib/Transforms/Scalar/SimplifyCFGPass.cpp
+++ b/
lib/Transforms/Scalar/SimplifyCFGPass.cpp
@@
-244,7
+244,7
@@
static bool MergeEmptyReturnBlocks(Function &F) {
// If the canonical return block has no PHI node, create one now.
PHINode *RetBlockPHI = dyn_cast<PHINode>(RetBlock->begin());
if (RetBlockPHI == 0) {
- Value *InVal = cast<ReturnInst>(RetBlock->
begin
())->getOperand(0);
+ Value *InVal = cast<ReturnInst>(RetBlock->
getTerminator
())->getOperand(0);
RetBlockPHI = PHINode::Create(Ret->getOperand(0)->getType(), "merge",
&RetBlock->front());