From 6e95ae803a0274d69d366ce118b58f46ea3cdf50 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 31 Dec 2012 00:49:59 +0000 Subject: Remove the getAttributesAtIndex and getNumAttrs methods in favor of using the getAttrSomewhere predicate. This prevents the uses of 'Attribute' as a collection of attributes. llvm-svn: 171271 --- llvm/lib/Target/XCore/XCoreFrameLowering.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Target/XCore/XCoreFrameLowering.cpp') diff --git a/llvm/lib/Target/XCore/XCoreFrameLowering.cpp b/llvm/lib/Target/XCore/XCoreFrameLowering.cpp index aa185d67380..ffb0c53b3b2 100644 --- a/llvm/lib/Target/XCore/XCoreFrameLowering.cpp +++ b/llvm/lib/Target/XCore/XCoreFrameLowering.cpp @@ -100,11 +100,8 @@ void XCoreFrameLowering::emitPrologue(MachineFunction &MF) const { bool FP = hasFP(MF); const AttributeSet &PAL = MF.getFunction()->getAttributes(); - for (unsigned I = 0, E = PAL.getNumAttrs(); I != E; ++I) - if (PAL.getAttributesAtIndex(I).hasAttribute(Attribute::Nest)) { - loadFromStack(MBB, MBBI, XCore::R11, 0, dl, TII); - break; - } + if (PAL.hasAttrSomewhere(Attribute::Nest)) + loadFromStack(MBB, MBBI, XCore::R11, 0, dl, TII); // Work out frame sizes. int FrameSize = MFI->getStackSize(); -- cgit v1.2.3