@@ -561,7 +561,7 @@ class ASTWriter : public ASTDeserializationListener,
561
561
void WriteHeaderSearch (const HeaderSearch &HS);
562
562
void WritePreprocessorDetail (PreprocessingRecord &PPRec,
563
563
uint64_t MacroOffsetsBase);
564
- void WriteSubmodules (Module *WritingModule, ASTContext & Context);
564
+ void WriteSubmodules (Module *WritingModule, ASTContext * Context);
565
565
566
566
void WritePragmaDiagnosticMappings (const DiagnosticsEngine &Diag,
567
567
bool isModule);
@@ -582,7 +582,7 @@ class ASTWriter : public ASTDeserializationListener,
582
582
void WriteComments (ASTContext &Context);
583
583
void WriteSelectors (Sema &SemaRef);
584
584
void WriteReferencedSelectorsPool (Sema &SemaRef);
585
- void WriteIdentifierTable (Preprocessor &PP, IdentifierResolver & IdResolver,
585
+ void WriteIdentifierTable (Preprocessor &PP, IdentifierResolver * IdResolver,
586
586
bool IsModule);
587
587
void WriteDeclAndTypes (ASTContext &Context);
588
588
void PrepareWritingSpecialDecls (Sema &SemaRef);
@@ -639,7 +639,7 @@ class ASTWriter : public ASTDeserializationListener,
639
639
void WriteDeclAbbrevs ();
640
640
void WriteDecl (ASTContext &Context, Decl *D);
641
641
642
- ASTFileSignature WriteASTCore (Sema &SemaRef , StringRef isysroot,
642
+ ASTFileSignature WriteASTCore (Sema *SemaPtr , StringRef isysroot,
643
643
Module *WritingModule);
644
644
645
645
public:
@@ -661,8 +661,8 @@ class ASTWriter : public ASTDeserializationListener,
661
661
662
662
// / Write a precompiled header for the given semantic analysis.
663
663
// /
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 .
666
666
// /
667
667
// / \param WritingModule The module that we are writing. If null, we are
668
668
// / writing a precompiled header.
@@ -673,8 +673,9 @@ class ASTWriter : public ASTDeserializationListener,
673
673
// /
674
674
// / \return the module signature, which eventually will be a hash of
675
675
// / 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,
678
679
bool ShouldCacheASTInMemory = false );
679
680
680
681
// / Emit a token.
0 commit comments