summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index 3d08ecdd484..3b1140ab542 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -1123,7 +1123,7 @@ AttributeList::addAllocSizeAttr(LLVMContext &C, unsigned Index,
LLVMContext &AttributeList::getContext() const { return pImpl->getContext(); }
AttributeSet AttributeList::getParamAttributes(unsigned ArgNo) const {
- return getAttributes(ArgNo + 1);
+ return getAttributes(ArgNo + FirstArgIndex);
}
AttributeSet AttributeList::getRetAttributes() const {
@@ -1189,7 +1189,7 @@ unsigned AttributeList::getRetAlignment() const {
}
unsigned AttributeList::getParamAlignment(unsigned ArgNo) const {
- return getAttributes(ArgNo + 1).getAlignment();
+ return getAttributes(ArgNo + FirstArgIndex).getAlignment();
}
unsigned AttributeList::getStackAlignment(unsigned Index) const {
OpenPOWER on IntegriCloud