[llvm-commits] [llvm] r54467 - /llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
Matthijs Kooijman
matthijs at stdin.nl
Thu Aug 7 08:58:15 PDT 2008
Author: matthijs
Date: Thu Aug 7 10:58:09 2008
New Revision: 54467
URL: http://llvm.org/viewvc/llvm-project?rev=54467&view=rev
Log:
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).
Modified:
llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
Modified: llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp?rev=54467&r1=54466&r2=54467&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp Thu Aug 7 10:58:09 2008
@@ -121,7 +121,7 @@
++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();
}
More information about the llvm-commits
mailing list