Fix off-by-one bug in AttributeList::addAttributes index handling
authorReid Kleckner <rnk@google.com>
Fri, 19 May 2017 22:23:47 +0000 (22:23 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 19 May 2017 22:23:47 +0000 (22:23 +0000)
commitbf6b3b1564f1846c5c729b582b4bc3f97d946770
treebe89cb95ed883c6a0f284d28a9624af2d5d8e66f
parent78706a3daebcac93517b1560a1092828b3505ea5
Fix off-by-one bug in AttributeList::addAttributes index handling

getParamAlignment expects an argument number, not an AttributeList
index.

Johan Englan, who works on LDC, found this bug and told me about it off
list.

llvm-svn: 303458
llvm/lib/IR/Attributes.cpp
llvm/unittests/IR/AttributesTest.cpp