diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-03-13 08:01:03 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-03-13 08:01:03 +0000 |
commit | 90a021fb02b7ee1413c56f45a2a60ee066b305f3 (patch) | |
tree | aa2bd716ecea565561ff1ac60a52051db1128f3c | |
parent | 1e720b9c0c69123786d9c38c4e72e36f7e436611 (diff) | |
download | bcm5719-llvm-90a021fb02b7ee1413c56f45a2a60ee066b305f3.tar.gz bcm5719-llvm-90a021fb02b7ee1413c56f45a2a60ee066b305f3.zip |
[Bitcode] Make writeComdats less strange
It had a weird artificial limitation on the write side: the comdat name
couldn't be bigger than 2**16. However, the reader had no such
limitation. Make the reader and the writer agree.
llvm-svn: 263377
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 84d09635d1c..2e13958fdb1 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -580,12 +580,12 @@ static unsigned getEncodedComdatSelectionKind(const Comdat &C) { } static void writeComdats(const ValueEnumerator &VE, BitstreamWriter &Stream) { - SmallVector<uint16_t, 64> Vals; + SmallVector<unsigned, 64> Vals; for (const Comdat *C : VE.getComdats()) { // COMDAT: [selection_kind, name] Vals.push_back(getEncodedComdatSelectionKind(*C)); size_t Size = C->getName().size(); - assert(isUInt<16>(Size)); + assert(isUInt<32>(Size)); Vals.push_back(Size); for (char Chr : C->getName()) Vals.push_back((unsigned char)Chr); |