aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-15 07:31:59 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-15 07:31:59 +0000
commit75d37b493e2282f993a19a166bd573b03a7535af (patch)
tree855331cbf88da843e13a9490e580740ea09c7a9a /lib/CodeGen/CGCall.cpp
parent2b49d1f0ad790a8a5d514af1be211591a746cb73 (diff)
Use enum values instead of magic numbers for indexing into the attribute list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 15db9fd305..715438c8ff 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1006,7 +1006,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
if (RetAttrs.hasAttributes())
PAL.push_back(llvm::
- AttributeWithIndex::get(0,
+ AttributeWithIndex::get(llvm::AttrListPtr::ReturnIndex,
llvm::Attributes::get(getLLVMContext(),
RetAttrs)));
@@ -1080,7 +1080,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
++Index;
}
if (FuncAttrs.hasAttributes())
- PAL.push_back(llvm::AttributeWithIndex::get(~0,
+ PAL.push_back(llvm::
+ AttributeWithIndex::get(llvm::AttrListPtr::FunctionIndex,
llvm::Attributes::get(getLLVMContext(),
FuncAttrs)));
}