Bitcode: Simplify emission of METADATA_BLOCK
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 12 Jan 2015 22:30:34 +0000 (22:30 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 12 Jan 2015 22:30:34 +0000 (22:30 +0000)
commit8d86cef92fd7f50132d811a1a5c880bd0f47771d
treebe55231079716faf29cc4c34c6082f5419510e8e
parent0c51e0a826740825644ad6182129a578cf7e00c5
Bitcode: Simplify emission of METADATA_BLOCK

Refactor logic so that we know up-front whether to open a block and
whether we need an MDString abbreviation.

This is almost NFC, but will start emitting `MDString` abbreviations
when the first record is not an `MDString`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225712 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/Bitcode/Writer/ValueEnumerator.cpp
lib/Bitcode/Writer/ValueEnumerator.h