]> granicus.if.org Git - llvm/commit
[IR] Take func, ret, and arg attrs separately in AttributeList::get
authorReid Kleckner <rnk@google.com>
Thu, 13 Apr 2017 00:58:09 +0000 (00:58 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 13 Apr 2017 00:58:09 +0000 (00:58 +0000)
commite9a46bf123cf40748eb8381b98420c35f3224ccc
tree490c9ee7b51a187980ecaa49ce8504cca473de48
parent2d32ddf143461413ee2d86a3a096912d8d0a2ed4
[IR] Take func, ret, and arg attrs separately in AttributeList::get

This seems like a much more natural API, based on Derek Schuff's
comments on r300015. It further hides the implementation detail of
AttributeList that function attributes come last and appear at index
~0U, which is easy for the user to screw up. git diff says it saves code
as well: 97 insertions(+), 137 deletions(-)

This also makes it easier to change the implementation, which I want to
do next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300153 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Attributes.h
lib/AsmParser/LLParser.cpp
lib/IR/Attributes.cpp
lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
lib/Transforms/IPO/ArgumentPromotion.cpp
lib/Transforms/IPO/DeadArgumentElimination.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/Utils/CloneFunction.cpp