@@ -561,7 +561,7 @@ class ASTWriter : public ASTDeserializationListener,
561561 void WriteHeaderSearch (const HeaderSearch &HS);
562562 void WritePreprocessorDetail (PreprocessingRecord &PPRec,
563563 uint64_t MacroOffsetsBase);
564- void WriteSubmodules (Module *WritingModule, ASTContext & Context);
564+ void WriteSubmodules (Module *WritingModule, ASTContext * Context);
565565
566566 void WritePragmaDiagnosticMappings (const DiagnosticsEngine &Diag,
567567 bool isModule);
@@ -582,7 +582,7 @@ class ASTWriter : public ASTDeserializationListener,
582582 void WriteComments (ASTContext &Context);
583583 void WriteSelectors (Sema &SemaRef);
584584 void WriteReferencedSelectorsPool (Sema &SemaRef);
585- void WriteIdentifierTable (Preprocessor &PP, IdentifierResolver & IdResolver,
585+ void WriteIdentifierTable (Preprocessor &PP, IdentifierResolver * IdResolver,
586586 bool IsModule);
587587 void WriteDeclAndTypes (ASTContext &Context);
588588 void PrepareWritingSpecialDecls (Sema &SemaRef);
@@ -639,7 +639,7 @@ class ASTWriter : public ASTDeserializationListener,
639639 void WriteDeclAbbrevs ();
640640 void WriteDecl (ASTContext &Context, Decl *D);
641641
642- ASTFileSignature WriteASTCore (Sema &SemaRef , StringRef isysroot,
642+ ASTFileSignature WriteASTCore (Sema *SemaPtr , StringRef isysroot,
643643 Module *WritingModule);
644644
645645public:
@@ -661,8 +661,8 @@ class ASTWriter : public ASTDeserializationListener,
661661
662662 // / Write a precompiled header for the given semantic analysis.
663663 // /
664- // / \param SemaRef a reference to the semantic analysis object that processed
665- // / the AST to be written into the precompiled header .
664+ // / \param Subject The object that processed the input to be written into the
665+ // / AST file .
666666 // /
667667 // / \param WritingModule The module that we are writing. If null, we are
668668 // / writing a precompiled header.
@@ -673,8 +673,9 @@ class ASTWriter : public ASTDeserializationListener,
673673 // /
674674 // / \return the module signature, which eventually will be a hash of
675675 // / the module but currently is merely a random 32-bit number.
676- ASTFileSignature WriteAST (Sema &SemaRef, StringRef OutputFile,
677- Module *WritingModule, StringRef isysroot,
676+ ASTFileSignature WriteAST (llvm::PointerUnion<Sema *, Preprocessor*> Subject,
677+ StringRef OutputFile, Module *WritingModule,
678+ StringRef isysroot,
678679 bool ShouldCacheASTInMemory = false );
679680
680681 // / Emit a token.
0 commit comments