diff options
Diffstat (limited to 'lib/Transforms/IPO/ArgumentPromotion.cpp')
| -rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index c5b17dba51..39062e676c 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -519,7 +519,8 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, // Add any return attributes. if (PAL.hasAttributes(AttributeSet::ReturnIndex)) - AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::ReturnIndex, + AttributesVec.push_back(AttributeWithIndex::get(F->getContext(), + AttributeSet::ReturnIndex, PAL.getRetAttributes())); // First, determine the new argument list @@ -639,7 +640,8 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, // Add any return attributes. if (CallPAL.hasAttributes(AttributeSet::ReturnIndex)) - AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::ReturnIndex, + AttributesVec.push_back(AttributeWithIndex::get(F->getContext(), + AttributeSet::ReturnIndex, CallPAL.getRetAttributes())); // Loop over the operands, inserting GEP and loads in the caller as |
