diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-30 23:07:40 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-30 23:07:40 +0000 |
commit | d219675c2a8d5acc0bb77752cf242a7af0f97fe0 (patch) | |
tree | 7df5a6487a651c77b636c1b4d3e4cb56c93b6a36 /llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp | |
parent | 85e62eca660491a5b1a31bfe1e4b0efe7a5b93a5 (diff) | |
download | bcm5719-llvm-d219675c2a8d5acc0bb77752cf242a7af0f97fe0.tar.gz bcm5719-llvm-d219675c2a8d5acc0bb77752cf242a7af0f97fe0.zip |
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.
llvm-svn: 173990
Diffstat (limited to 'llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp index e651fb8d50e..49ef1e75f1c 100644 --- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/llvm/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)); |