summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/DeadArgumentElimination.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-30 23:07:40 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-30 23:07:40 +0000
commite74365462a39529ae48ef4d34ec76b4543b8ea29 (patch)
tree9b33c2e0687dc421a4b4e64c436b6c81f92bb855 /lib/Transforms/IPO/DeadArgumentElimination.cpp
parentb25a645830b49beb1c5dbc326953ed16f77a19ed (diff)
downloadllvm-e74365462a39529ae48ef4d34ec76b4543b8ea29.tar.gz
llvm-e74365462a39529ae48ef4d34ec76b4543b8ea29.tar.bz2
llvm-e74365462a39529ae48ef4d34ec76b4543b8ea29.tar.xz
Convert typeIncompatible to return an AttributeSet.
There are still places which treat the Attribute object as a collection of attributes. I'm systematically removing them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/DeadArgumentElimination.cpp')
-rw-r--r--lib/Transforms/IPO/DeadArgumentElimination.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp
index e651fb8d50..49ef1e75f1 100644
--- a/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -764,10 +764,14 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) {
RAttrs =
AttributeSet::get(NRetTy->getContext(), AttributeSet::ReturnIndex,
AttrBuilder(RAttrs, AttributeSet::ReturnIndex).
- removeAttributes(AttributeFuncs::typeIncompatible(NRetTy)));
+ removeAttributes(AttributeFuncs::
+ typeIncompatible(NRetTy, AttributeSet::ReturnIndex),
+ AttributeSet::ReturnIndex));
else
assert(!AttrBuilder(RAttrs, AttributeSet::ReturnIndex).
- hasAttributes(AttributeFuncs::typeIncompatible(NRetTy)) &&
+ hasAttributes(AttributeFuncs::
+ typeIncompatible(NRetTy, AttributeSet::ReturnIndex),
+ AttributeSet::ReturnIndex) &&
"Return attributes no longer compatible?");
if (RAttrs.hasAttributes(AttributeSet::ReturnIndex))
@@ -841,7 +845,10 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) {
RAttrs =
AttributeSet::get(NF->getContext(), AttributeSet::ReturnIndex,
AttrBuilder(RAttrs, AttributeSet::ReturnIndex).
- removeAttributes(AttributeFuncs::typeIncompatible(NF->getReturnType())));
+ removeAttributes(AttributeFuncs::
+ typeIncompatible(NF->getReturnType(),
+ AttributeSet::ReturnIndex),
+ AttributeSet::ReturnIndex));
if (RAttrs.hasAttributes(AttributeSet::ReturnIndex))
AttributesVec.push_back(AttributeSet::get(NF->getContext(), RAttrs));