summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-21 22:44:49 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-21 22:44:49 +0000
commitc90d9f89b7d85c6b4ae3692a78046e1496c8537e (patch)
tree4698bab5e4e80201bd516e46994bc43390d780d6 /llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
parent60ccb9b2a926329de3d49716704c51cf7958b437 (diff)
downloadbcm5719-llvm-c90d9f89b7d85c6b4ae3692a78046e1496c8537e.tar.gz
bcm5719-llvm-c90d9f89b7d85c6b4ae3692a78046e1496c8537e.zip
Have AttributeSet::getRetAttributes() return an AttributeSet instead of Attribute.
This further restricts the use of the Attribute class to the Attribute family of classes. llvm-svn: 173098
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 c5b17dba515..39062e676c1 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud