diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 24d87f0680..d862501c4f 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -1589,7 +1589,7 @@ public: Expr *ReadSubExpr(); /// \brief Reads the macro record located at the given offset. - PreprocessedEntity *ReadMacroRecord(Module &F, uint64_t Offset); + void ReadMacroRecord(Module &F, uint64_t Offset); /// \brief Reads the preprocessed entity located at the current stream /// position. diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index e651c3804f..62ce2f8c8a 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -1413,7 +1413,7 @@ bool ASTReader::ReadBlockAbbrevs(llvm::BitstreamCursor &Cursor, } } -PreprocessedEntity *ASTReader::ReadMacroRecord(Module &F, uint64_t Offset) { +void ASTReader::ReadMacroRecord(Module &F, uint64_t Offset) { assert(PP && "Forgot to set Preprocessor ?"); llvm::BitstreamCursor &Stream = F.MacroCursor; @@ -1430,14 +1430,14 @@ PreprocessedEntity *ASTReader::ReadMacroRecord(Module &F, uint64_t Offset) { unsigned Code = Stream.ReadCode(); switch (Code) { case llvm::bitc::END_BLOCK: - return 0; + return; case llvm::bitc::ENTER_SUBBLOCK: // No known subblocks, always skip them. Stream.ReadSubBlockID(); if (Stream.SkipBlock()) { Error("malformed block record in AST file"); - return 0; + return; } continue; @@ -1461,12 +1461,12 @@ PreprocessedEntity *ASTReader::ReadMacroRecord(Module &F, uint64_t Offset) { // of the definition of the macro we were looking for. We're // done. if (Macro) - return 0; + return; IdentifierInfo *II = getLocalIdentifier(F, Record[0]); if (II == 0) { Error("macro must have a name in AST file"); - return 0; + return; } SourceLocation Loc = ReadSourceLocation(F, Record[1]); bool isUsed = Record[2]; @@ -1530,7 +1530,7 @@ PreprocessedEntity *ASTReader::ReadMacroRecord(Module &F, uint64_t Offset) { } } - return 0; + return; } PreprocessedEntity *ASTReader::LoadPreprocessedEntity(Module &F) {