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 75c0504060..c5b17dba51 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -591,7 +591,8 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, // Add any function attributes. if (PAL.hasAttributes(AttributeSet::FunctionIndex)) - AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::FunctionIndex, + AttributesVec.push_back(AttributeWithIndex::get(FTy->getContext(), + AttributeSet::FunctionIndex, PAL.getFnAttributes())); Type *RetTy = FTy->getReturnType(); @@ -719,7 +720,8 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, // Add any function attributes. if (CallPAL.hasAttributes(AttributeSet::FunctionIndex)) - AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::FunctionIndex, + AttributesVec.push_back(AttributeWithIndex::get(Call->getContext(), + AttributeSet::FunctionIndex, CallPAL.getFnAttributes())); Instruction *New; |