diff options
-rw-r--r-- | include/llvm/Bitcode/NaCl/NaClLLVMBitCodes.h | 6 | ||||
-rw-r--r-- | lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp | 43 | ||||
-rw-r--r-- | lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h | 2 | ||||
-rw-r--r-- | tools/pnacl-bcanalyzer/pnacl-bcanalyzer.cpp | 5 |
4 files changed, 1 insertions, 55 deletions
diff --git a/include/llvm/Bitcode/NaCl/NaClLLVMBitCodes.h b/include/llvm/Bitcode/NaCl/NaClLLVMBitCodes.h index b9c358f271..90d482afaf 100644 --- a/include/llvm/Bitcode/NaCl/NaClLLVMBitCodes.h +++ b/include/llvm/Bitcode/NaCl/NaClLLVMBitCodes.h @@ -43,7 +43,7 @@ namespace naclbitc { TYPE_BLOCK_ID_NEW, - USELIST_BLOCK_ID, + USELIST_BLOCK_ID, // Not used in PNaCl. GLOBALVAR_BLOCK_ID }; @@ -323,10 +323,6 @@ namespace naclbitc { // PNaCl version 2: CALL_INDIRECT: [cc, fnid, fnty, args...] FUNC_CODE_INST_CALL_INDIRECT = 44 }; - - enum NaClUseListCodes { - USELIST_CODE_ENTRY = 1 // USELIST_CODE_ENTRY: TBD. - }; } // End naclbitc namespace } // End llvm namespace 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; diff --git a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h index 762088887f..f69fdbdfd4 100644 --- a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h +++ b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h @@ -172,7 +172,6 @@ class NaClBitcodeReader : public GVMaterializer { std::vector<Type*> TypeList; NaClBitcodeReaderValueList ValueList; - SmallVector<SmallVector<uint64_t, 64>, 64> UseListRecords; // Holds information about each BasicBlock in the function being read. struct BasicBlockInfo { @@ -366,7 +365,6 @@ private: bool RememberAndSkipFunctionBody(); bool ParseFunctionBody(Function *F); bool GlobalCleanup(); - bool ParseUseLists(); bool InitStream(); bool InitStreamFromBuffer(); bool InitLazyStream(); diff --git a/tools/pnacl-bcanalyzer/pnacl-bcanalyzer.cpp b/tools/pnacl-bcanalyzer/pnacl-bcanalyzer.cpp index 73b328f118..d5f61c14cd 100644 --- a/tools/pnacl-bcanalyzer/pnacl-bcanalyzer.cpp +++ b/tools/pnacl-bcanalyzer/pnacl-bcanalyzer.cpp @@ -273,11 +273,6 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID, case naclbitc::METADATA_FN_NODE: return "METADATA_FN_NODE"; case naclbitc::METADATA_NAMED_NODE: return "METADATA_NAMED_NODE"; } - case naclbitc::USELIST_BLOCK_ID: - switch(CodeID) { - default:return 0; - case naclbitc::USELIST_CODE_ENTRY: return "USELIST_CODE_ENTRY"; - } case naclbitc::GLOBALVAR_BLOCK_ID: switch (CodeID) { default: return 0; |