diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-12-31 00:49:59 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-12-31 00:49:59 +0000 |
commit | 9d30e7208e6b2bc3fa48305e3ae371188f643425 (patch) | |
tree | ae1e458e31434ea097a6c2cdc12e04fc63e00f8f /lib/Transforms/InstCombine/InstCombineCalls.cpp | |
parent | d60b8ac64fa161646d50c49d6171cb49e6a2c7ee (diff) |
Remove the getAttributesAtIndex and getNumAttrs methods in favor of using the getAttrSomewhere predicate. This prevents the uses of 'Attribute' as a collection of attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171271 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineCalls.cpp')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCalls.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp index 23306b4079..fcd16b82cc 100644 --- a/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -1248,9 +1248,8 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS, // If the call already has the 'nest' attribute somewhere then give up - // otherwise 'nest' would occur twice after splicing in the chain. - for (unsigned I = 0, E = Attrs.getNumAttrs(); I != E; ++I) - if (Attrs.getAttributesAtIndex(I).hasAttribute(Attribute::Nest)) - return 0; + if (Attrs.hasAttrSomewhere(Attribute::Nest)) + return 0; assert(Tramp && "transformCallThroughTrampoline called with incorrect CallSite."); |