aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/InstCombine/InstCombineCalls.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-09 07:45:08 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-09 07:45:08 +0000
commit6765834754cbb3cb0f15b4b15e98c5e73fa50066 (patch)
treed2d827f8d5acfde264a1b8f883884e8297879c5f /lib/Transforms/InstCombine/InstCombineCalls.cpp
parent50cf36351cefbc64bca9b82b4a3897394feecac7 (diff)
downloadexternal_llvm-6765834754cbb3cb0f15b4b15e98c5e73fa50066.zip
external_llvm-6765834754cbb3cb0f15b4b15e98c5e73fa50066.tar.gz
external_llvm-6765834754cbb3cb0f15b4b15e98c5e73fa50066.tar.bz2
Create enums for the different attributes.
We use the enums to query whether an Attributes object has that attribute. The opaque layer is responsible for knowing where that specific attribute is stored. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165488 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineCalls.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCalls.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp
index f480260..f92c4ba 100644
--- a/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -1072,7 +1072,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) {
// If the parameter is passed as a byval argument, then we have to have a
// sized type and the sized type has to have the same size as the old type.
- if (ParamTy != ActTy && Attrs.hasByValAttr()) {
+ if (ParamTy != ActTy && Attrs.hasAttribute(Attributes::ByVal)) {
PointerType *ParamPTy = dyn_cast<PointerType>(ParamTy);
if (ParamPTy == 0 || !ParamPTy->getElementType()->isSized() || TD == 0)
return false;
@@ -1264,7 +1264,7 @@ 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).hasNestAttr())
+ if (Attrs.getAttributesAtIndex(I).hasAttribute(Attributes::Nest))
return 0;
assert(Tramp &&
@@ -1283,7 +1283,7 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS,
// Look for a parameter marked with the 'nest' attribute.
for (FunctionType::param_iterator I = NestFTy->param_begin(),
E = NestFTy->param_end(); I != E; ++NestIdx, ++I)
- if (NestAttrs.getParamAttributes(NestIdx).hasNestAttr()) {
+ if (NestAttrs.getParamAttributes(NestIdx).hasAttribute(Attributes::Nest)){
// Record the parameter type and any other attributes.
NestTy = *I;
NestAttr = NestAttrs.getParamAttributes(NestIdx);