Large mechanical patch.
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp
index 9968d59..821e7d5 100644
--- a/lib/Transforms/IPO/PruneEH.cpp
+++ b/lib/Transforms/IPO/PruneEH.cpp
@@ -125,18 +125,18 @@
// If the SCC doesn't unwind or doesn't throw, note this fact.
if (!SCCMightUnwind || !SCCMightReturn)
for (unsigned i = 0, e = SCC.size(); i != e; ++i) {
- Attributes NewAttributes = ParamAttr::None;
+ Attributes NewAttributes = Attribute::None;
if (!SCCMightUnwind)
- NewAttributes |= ParamAttr::NoUnwind;
+ NewAttributes |= Attribute::NoUnwind;
if (!SCCMightReturn)
- NewAttributes |= ParamAttr::NoReturn;
+ NewAttributes |= Attribute::NoReturn;
- const PAListPtr &PAL = SCC[i]->getFunction()->getParamAttrs();
- const PAListPtr &NPAL = PAL.addAttr(0, NewAttributes);
+ const AttrListPtr &PAL = SCC[i]->getFunction()->getAttributes();
+ const AttrListPtr &NPAL = PAL.addAttr(0, NewAttributes);
if (PAL != NPAL) {
MadeChange = true;
- SCC[i]->getFunction()->setParamAttrs(NPAL);
+ SCC[i]->getFunction()->setAttributes(NPAL);
}
}
@@ -169,7 +169,7 @@
Args.begin(), Args.end(), "", II);
Call->takeName(II);
Call->setCallingConv(II->getCallingConv());
- Call->setParamAttrs(II->getParamAttrs());
+ Call->setAttributes(II->getAttributes());
// Anything that used the value produced by the invoke instruction
// now uses the value produced by the call instruction.