aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-21 21:57:28 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-21 21:57:28 +0000
commitbd4ea16bf39033271255dfbcc8ffb636a7de26bb (patch)
tree1f7b638c81daf44cefb27e811c4c3f2003c0a633 /llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
parent9d86a4a3b636abc9871108d0ffecb990b824f3dd (diff)
downloadllvm-bd4ea16bf39033271255dfbcc8ffb636a7de26bb.zip
llvm-bd4ea16bf39033271255dfbcc8ffb636a7de26bb.tar.gz
llvm-bd4ea16bf39033271255dfbcc8ffb636a7de26bb.tar.bz2
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
Diffstat (limited to 'llvm/lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/ArgumentPromotion.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index 75c05040..c5b17db 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;