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
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 15db9fd..715438c 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1006,7 +1006,7 @@
if (RetAttrs.hasAttributes())
PAL.push_back(llvm::
- AttributeWithIndex::get(0,
+ AttributeWithIndex::get(llvm::AttrListPtr::ReturnIndex,
llvm::Attributes::get(getLLVMContext(),
RetAttrs)));
@@ -1080,7 +1080,8 @@
++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)));
}