summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2008-08-07 15:58:09 +0000
committerMatthijs Kooijman <matthijs@stdin.nl>2008-08-07 15:58:09 +0000
commita7bab2c81c2b7340d210b9cf9221c5157d60b969 (patch)
tree6783fc3e370792253711c677314262ec2081176b /lib/Transforms/IPO
parent1d63d92092ebcefcb0dc6a98736d27eb1796f5ca (diff)
downloadllvm-a7bab2c81c2b7340d210b9cf9221c5157d60b969.tar.gz
llvm-a7bab2c81c2b7340d210b9cf9221c5157d60b969.tar.bz2
llvm-a7bab2c81c2b7340d210b9cf9221c5157d60b969.tar.xz
Fix SRETPromotion, it was generating functions without returns statements since
r53941 (but this was not noticed due to the lack of a basic test for SRETPromotion). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54467 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r--lib/Transforms/IPO/StructRetPromotion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/StructRetPromotion.cpp b/lib/Transforms/IPO/StructRetPromotion.cpp
index 314d1b9871..ae6d55f06d 100644
--- a/lib/Transforms/IPO/StructRetPromotion.cpp
+++ b/lib/Transforms/IPO/StructRetPromotion.cpp
@@ -121,7 +121,7 @@ bool SRETPromotion::PromoteReturn(CallGraphNode *CGN) {
++BI;
if (isa<ReturnInst>(I)) {
Value *NV = new LoadInst(TheAlloca, "mrv.ld", I);
- ReturnInst *NR = ReturnInst::Create(NV);
+ ReturnInst *NR = ReturnInst::Create(NV, I);
I->replaceAllUsesWith(NR);
I->eraseFromParent();
}