aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-08-30 19:32:15 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-08-30 19:32:15 -0700
commit0dc171568f4981102c284b461b9acb5b4ef44749 (patch)
tree24c734dd1f6926f3e7de22a8c6cb1fdf39d764e2 /lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
parent121830a16cdb2685b1ac49bb88407644c044ef30 (diff)
PNaCl bitcode: Remove handling of USELIST blocks
These blocks are never generated by the PNaCl bitcode writer. The code for generating them was removed when BitcodeWriter.cpp was copied to produce NaClBitcodeWriter.cpp in 5712db994c8a4abb8c2512fb2900650f8335af66. The same wasn't done when BitcodeReader.cpp was copied to produce NaClBitcodeReader.cpp, so we do this now. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3590 TEST=PNaCl toolchain trybots Review URL: https://codereview.chromium.org/23598005
Diffstat (limited to 'lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp')
-rw-r--r--lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
index 9e8c398172..87eab106a0 100644
--- a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
+++ b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
@@ -894,45 +894,6 @@ bool NaClBitcodeReader::ParseConstants() {
}
}
-bool NaClBitcodeReader::ParseUseLists() {
- DEBUG(dbgs() << "-> ParseUseLists\n");
- if (Stream.EnterSubBlock(naclbitc::USELIST_BLOCK_ID))
- return Error("Malformed block record");
-
- SmallVector<uint64_t, 64> Record;
-
- // Read all the records.
- while (1) {
- NaClBitstreamEntry Entry = Stream.advanceSkippingSubblocks();
-
- switch (Entry.Kind) {
- case NaClBitstreamEntry::SubBlock: // Handled for us already.
- case NaClBitstreamEntry::Error:
- return Error("malformed use list block");
- case NaClBitstreamEntry::EndBlock:
- DEBUG(dbgs() << "<- ParseUseLists\n");
- return false;
- case NaClBitstreamEntry::Record:
- // The interesting case.
- break;
- }
-
- // Read a use list record.
- Record.clear();
- switch (Stream.readRecord(Entry.ID, Record)) {
- default: // Default behavior: unknown type.
- break;
- case naclbitc::USELIST_CODE_ENTRY: { // USELIST_CODE_ENTRY: TBD.
- unsigned RecordLength = Record.size();
- if (RecordLength < 1)
- return Error ("Invalid UseList reader!");
- UseListRecords.push_back(Record);
- break;
- }
- }
- }
-}
-
/// RememberAndSkipFunctionBody - When we see the block for a function body,
/// remember where it is and then skip it. This lets us lazily deserialize the
/// functions.
@@ -1047,10 +1008,6 @@ bool NaClBitcodeReader::ParseModule(bool Resume) {
return false;
}
break;
- case naclbitc::USELIST_BLOCK_ID:
- if (ParseUseLists())
- return true;
- break;
}
continue;