From bd4ea16bf39033271255dfbcc8ffb636a7de26bb Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 21 Jan 2013 21:57:28 +0000 Subject: Make AttributeSet::getFnAttributes() return an AttributeSet instead of an Attribute. This is more code to isolate the use of the Attribute class to that of just holding one attribute instead of a collection of attributes. llvm-svn: 173094 --- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/IPO/ArgumentPromotion.cpp') diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp index 75c05040608..c5b17dba515 100644 --- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/llvm/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; -- cgit v1.2.3