Skip to content

Commit 3a0c253

Browse files
committed
Merge commit '304c41217303' from llvm.org/main into next
2 parents dff613b + 304c412 commit 3a0c253

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

clang/include/clang/Serialization/ASTWriter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ class ASTWriter : public ASTDeserializationListener,
551551
void WriteControlBlock(Preprocessor &PP, StringRef isysroot);
552552

553553
/// Write out the signature and diagnostic options, and return the signature.
554-
void writeUnhashedControlBlock(Preprocessor &PP, ASTContext &Context);
554+
void writeUnhashedControlBlock(Preprocessor &PP);
555555
ASTFileSignature backpatchSignature();
556556

557557
/// Calculate hash of the pcm content.

clang/lib/Serialization/ASTWriter.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,8 +1271,7 @@ ASTFileSignature ASTWriter::backpatchSignature() {
12711271
return Signature;
12721272
}
12731273

1274-
void ASTWriter::writeUnhashedControlBlock(Preprocessor &PP,
1275-
ASTContext &Context) {
1274+
void ASTWriter::writeUnhashedControlBlock(Preprocessor &PP) {
12761275
using namespace llvm;
12771276

12781277
// Flush first to prepare the PCM hash (signature).
@@ -1325,7 +1324,7 @@ void ASTWriter::writeUnhashedControlBlock(Preprocessor &PP,
13251324
const auto &HSOpts = PP.getHeaderSearchInfo().getHeaderSearchOpts();
13261325

13271326
// Diagnostic options.
1328-
const auto &Diags = Context.getDiagnostics();
1327+
const auto &Diags = PP.getDiagnostics();
13291328
const DiagnosticOptions &DiagOpts = Diags.getDiagnosticOptions();
13301329
if (!HSOpts.ModulesSkipDiagnosticOptions) {
13311330
#define DIAGOPT(Name, Bits, Default) Record.push_back(DiagOpts.Name);
@@ -5364,7 +5363,7 @@ ASTFileSignature ASTWriter::WriteASTCore(Sema &SemaRef, StringRef isysroot,
53645363
// SourceLocations or FileIDs depends on it.
53655364
computeNonAffectingInputFiles();
53665365

5367-
writeUnhashedControlBlock(PP, Context);
5366+
writeUnhashedControlBlock(PP);
53685367

53695368
// Don't reuse type ID and Identifier ID from readers for C++ standard named
53705369
// modules since we want to support no-transitive-change model for named

0 commit comments

Comments
 (0)