1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

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). 

llvm-svn: 54467
This commit is contained in:
Matthijs Kooijman 2008-08-07 15:58:09 +00:00
parent cb2af3cd69
commit 287cca11b3

View File

@ -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();
}