aboutsummaryrefslogtreecommitdiffstats
path: root/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
commitc5f1bc88a2eb7ad9ff924ca90cf88494e5f947b9 (patch)
treefdb62d85df750d2679b71fdab4d43d4e8258162b /lib/Transforms/IPO/ArgumentPromotion.cpp
parent8e528100d210e225cee417229d94af91355118c0 (diff)
downloadexternal_llvm-c5f1bc88a2eb7ad9ff924ca90cf88494e5f947b9.zip
external_llvm-c5f1bc88a2eb7ad9ff924ca90cf88494e5f947b9.tar.gz
external_llvm-c5f1bc88a2eb7ad9ff924ca90cf88494e5f947b9.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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r--lib/Transforms/IPO/ArgumentPromotion.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp
index 75c0504..c5b17db 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;