summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitstreamReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitstreamReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitstreamReader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitstreamReader.cpp b/llvm/lib/Bitcode/Reader/BitstreamReader.cpp
index 330bc045cc6..0b549f7550f 100644
--- a/llvm/lib/Bitcode/Reader/BitstreamReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitstreamReader.cpp
@@ -319,9 +319,9 @@ void BitstreamCursor::ReadAbbrevRecord() {
}
bool BitstreamCursor::ReadBlockInfoBlock() {
- // If this is the second stream to get to the block info block, skip it.
+ // We expect the client to read the block info block at most once.
if (getBitStreamReader()->hasBlockInfoRecords())
- return SkipBlock();
+ report_fatal_error("Duplicate read of block info block");
if (EnterSubBlock(bitc::BLOCKINFO_BLOCK_ID)) return true;
OpenPOWER on IntegriCloud