projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix SRETPromotion, it was generating functions without returns statements since
[oota-llvm.git]
/
lib
/
Transforms
/
IPO
/
StructRetPromotion.cpp
diff --git
a/lib/Transforms/IPO/StructRetPromotion.cpp
b/lib/Transforms/IPO/StructRetPromotion.cpp
index 314d1b987119dd9de0eea6a3fa0f7e538e06fb94..ae6d55f06d0234c0ad25709afe7fdb814f44189b 100644
(file)
--- 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();
}