]> granicus.if.org Git - llvm/commit
Remove duplicate AttributeList::removeAttributes implementation
authorReid Kleckner <rnk@google.com>
Thu, 20 Apr 2017 18:08:36 +0000 (18:08 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 20 Apr 2017 18:08:36 +0000 (18:08 +0000)
commit4d00a6147fcb45668e6f06cc9d588c97c6d173f2
tree36b71709677b1a4636cdd11aeaf03d5e371a612b
parent999e03461fa2bf1d05f25348670d22566dff14ea
Remove duplicate AttributeList::removeAttributes implementation

Have the AttributeList overload delegate to the AttrBuilder one.
Simplify the AttrBuilder overload by avoiding getSlotAttributes, which
creates temporary AttributeLists.

Simplify `AttrBuilder::removeAttributes(AttributeList, unsigned)` by
using getAttributes instead of manually iterating over slots.

Extracted from https://reviews.llvm.org/D32262

NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300863 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Attributes.cpp