[Bitcode] Refactor attribute group writing to avoid getSlotAttributes
authorReid Kleckner <rnk@google.com>
Mon, 24 Apr 2017 20:38:30 +0000 (20:38 +0000)
committerReid Kleckner <rnk@google.com>
Mon, 24 Apr 2017 20:38:30 +0000 (20:38 +0000)
commitb4a2d18777f9fe5110b572bb25d0d6187be6f0d9
treec59579769e264eefaf44c5d91dbf3f1b1d1e42d6
parentb2c390e9f5f71ab8f023a5b428334faac0a07741
[Bitcode] Refactor attribute group writing to avoid getSlotAttributes

Summary:
That API creates a temporary AttributeList to carry an index and a
single AttributeSet. We need to carry the index in addition to the set,
because that is how attribute groups are currently encoded.

NFC

Reviewers: pcc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32262

llvm-svn: 301245
llvm/include/llvm/IR/Attributes.h
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
llvm/lib/Bitcode/Writer/ValueEnumerator.h
llvm/lib/IR/Attributes.cpp