Skip to content

Commit 83cc605

Browse files
committed
[NFC] [Serialization] Extract logics to write special decls from
ASTWriter::WriteASTCore ASTWriter::WriteASTCore is a big function and slightly hard to read. This patch extracts the logics to force emitting special declarations and writing special records for these declarations into member functions. This is helpful to improve the readability and also helpful for the following patch to write special declarations lazily.
1 parent b5aff11 commit 83cc605

File tree

2 files changed

+210
-152
lines changed

2 files changed

+210
-152
lines changed

clang/include/clang/Serialization/ASTWriter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,8 @@ class ASTWriter : public ASTDeserializationListener,
559559
void WriteIdentifierTable(Preprocessor &PP, IdentifierResolver &IdResolver,
560560
bool IsModule);
561561
void WriteDeclAndTypes(ASTContext &Context);
562+
void PrepareWritingSpecialDecls(Sema &SemaRef);
563+
void WriteSpecialDeclRecords(Sema &SemaRef);
562564
void WriteDeclUpdatesBlocks(RecordDataImpl &OffsetsRecord);
563565
void WriteDeclContextVisibleUpdate(const DeclContext *DC);
564566
void WriteFPPragmaOptions(const FPOptionsOverride &Opts);

0 commit comments

Comments
 (0)