Skip to content

Commit 95002af

Browse files
authored
Merge pull request #3219 from bnbarham/cherry-rdar79329355
[20210726][Modules] Do not remove failed modules after the control block phase
2 parents 4927057 + 63c4225 commit 95002af

File tree

6 files changed

+335
-316
lines changed

6 files changed

+335
-316
lines changed

clang/include/clang/Serialization/ASTReader.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,18 +1313,18 @@ class ASTReader
13131313
ASTReaderListener *Listener,
13141314
bool ValidateDiagnosticOptions);
13151315

1316-
ASTReadResult ReadASTBlock(ModuleFile &F, unsigned ClientLoadCapabilities);
1317-
ASTReadResult ReadExtensionBlock(ModuleFile &F);
1316+
llvm::Error ReadASTBlock(ModuleFile &F, unsigned ClientLoadCapabilities);
1317+
llvm::Error ReadExtensionBlock(ModuleFile &F);
13181318
void ReadModuleOffsetMap(ModuleFile &F) const;
1319-
bool ParseLineTable(ModuleFile &F, const RecordData &Record);
1320-
bool ReadSourceManagerBlock(ModuleFile &F);
1319+
void ParseLineTable(ModuleFile &F, const RecordData &Record);
1320+
llvm::Error ReadSourceManagerBlock(ModuleFile &F);
13211321
llvm::BitstreamCursor &SLocCursorForID(int ID);
13221322
SourceLocation getImportLocation(ModuleFile *F);
13231323
ASTReadResult ReadModuleMapFileBlock(RecordData &Record, ModuleFile &F,
13241324
const ModuleFile *ImportedBy,
13251325
unsigned ClientLoadCapabilities);
1326-
ASTReadResult ReadSubmoduleBlock(ModuleFile &F,
1327-
unsigned ClientLoadCapabilities);
1326+
llvm::Error ReadSubmoduleBlock(ModuleFile &F,
1327+
unsigned ClientLoadCapabilities);
13281328
static bool ParseLanguageOptions(const RecordData &Record, bool Complain,
13291329
ASTReaderListener &Listener,
13301330
bool AllowCompatibleDifferences);
@@ -1896,8 +1896,9 @@ class ASTReader
18961896
/// ReadBlockAbbrevs - Enter a subblock of the specified BlockID with the
18971897
/// specified cursor. Read the abbreviations that are at the top of the block
18981898
/// and then leave the cursor pointing into the block.
1899-
static bool ReadBlockAbbrevs(llvm::BitstreamCursor &Cursor, unsigned BlockID,
1900-
uint64_t *StartOfBlockOffset = nullptr);
1899+
static llvm::Error ReadBlockAbbrevs(llvm::BitstreamCursor &Cursor,
1900+
unsigned BlockID,
1901+
uint64_t *StartOfBlockOffset = nullptr);
19011902

19021903
/// Finds all the visible declarations with a given name.
19031904
/// The current implementation of this method just loads the entire

0 commit comments

Comments
 (0)