mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fix up compnerd's change 46d684f to stop using BitstreamReader.
The more important fix here is to remove a duplicated call to advance the cursor, which led to module import being completely broken. I also added back the AF_DontPopBlockAtEnd flags that were dropped. I am not certain if they are needed but without clear indication otherwise, we should keep them.
This commit is contained in:
@@ -242,7 +242,7 @@ ValidationInfo serialization::validateSerializedAST(
|
||||
llvm::BitstreamEntry topLevelEntry;
|
||||
|
||||
while (!cursor.AtEndOfStream()) {
|
||||
topLevelEntry = cursor.advance();
|
||||
topLevelEntry = cursor.advance(AF_DontPopBlockAtEnd);
|
||||
if (topLevelEntry.Kind != llvm::BitstreamEntry::SubBlock)
|
||||
break;
|
||||
|
||||
@@ -774,7 +774,7 @@ ModuleFile::ModuleFile(
|
||||
llvm::BitstreamEntry topLevelEntry;
|
||||
|
||||
while (!cursor.AtEndOfStream()) {
|
||||
topLevelEntry = cursor.advance();
|
||||
topLevelEntry = cursor.advance(AF_DontPopBlockAtEnd);
|
||||
if (topLevelEntry.Kind != llvm::BitstreamEntry::SubBlock)
|
||||
break;
|
||||
|
||||
@@ -973,8 +973,6 @@ ModuleFile::ModuleFile(
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
topLevelEntry = cursor.advance(AF_DontPopBlockAtEnd);
|
||||
}
|
||||
|
||||
if (topLevelEntry.Kind != llvm::BitstreamEntry::EndBlock) {
|
||||
@@ -993,7 +991,7 @@ ModuleFile::ModuleFile(
|
||||
}
|
||||
|
||||
while (!docCursor.AtEndOfStream()) {
|
||||
topLevelEntry = docCursor.advance();
|
||||
topLevelEntry = docCursor.advance(AF_DontPopBlockAtEnd);
|
||||
if (topLevelEntry.Kind != llvm::BitstreamEntry::SubBlock)
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user