diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-10-04 06:58:52 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-10-04 06:58:52 +0000 |
commit | b44e3ee1a7af03062706cfa22ef4c0e57dfddca7 (patch) | |
tree | cba2024a0d10371f42dad44e48f39094dfdccc56 /lib/Transforms | |
parent | 5df15c692b944b6c46ec6d532fc286b7e0000d5d (diff) |
Use method to query for attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/GlobalOpt.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index b1ba6be5ff..7e3b45b6dd 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -2063,7 +2063,7 @@ static void ChangeCalleesToFastCall(Function *F) { static AttrListPtr StripNest(const AttrListPtr &Attrs) { for (unsigned i = 0, e = Attrs.getNumSlots(); i != e; ++i) { - if ((Attrs.getSlot(i).Attrs & Attribute::Nest) == 0) + if (!Attrs.getSlot(i).Attrs.hasNestAttr()) continue; // There can be only one. diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index 305d70f27b..a2427cffbd 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -714,7 +714,7 @@ bool CodeGenPrepare::DupRetToEnableTailCallOpts(ReturnInst *RI) { // See llvm::isInTailCallPosition(). const Function *F = BB->getParent(); Attributes CallerRetAttr = F->getAttributes().getRetAttributes(); - if ((CallerRetAttr & Attribute::ZExt) || (CallerRetAttr & Attribute::SExt)) + if (CallerRetAttr.hasZExtAttr() || CallerRetAttr.hasSExtAttr()) return false; // Make sure there are no instructions between the PHI and return, or that the |