aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/InstCombine/InstCombineCalls.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-12-31 00:49:59 +0000
committerBill Wendling <isanbard@gmail.com>2012-12-31 00:49:59 +0000
commit9d30e7208e6b2bc3fa48305e3ae371188f643425 (patch)
treeae1e458e31434ea097a6c2cdc12e04fc63e00f8f /lib/Transforms/InstCombine/InstCombineCalls.cpp
parentd60b8ac64fa161646d50c49d6171cb49e6a2c7ee (diff)
downloadexternal_llvm-9d30e7208e6b2bc3fa48305e3ae371188f643425.zip
external_llvm-9d30e7208e6b2bc3fa48305e3ae371188f643425.tar.gz
external_llvm-9d30e7208e6b2bc3fa48305e3ae371188f643425.tar.bz2
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.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 23306b4..fcd16b8 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.");