From e8619aa1c18bece2ed0603bf9ae08a4a68b2855f Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 4 Oct 2012 06:58:52 +0000 Subject: Use method to query for attributes. llvm-svn: 165209 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp | 2 +- llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index b1ba6be5ff6..7e3b45b6dda 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/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/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index 305d70f27b0..a2427cffbd6 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/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 -- cgit v1.2.3