diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-17 00:05:03 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-17 00:05:03 +0000 |
commit | 61c5e340c26971d195bd27232e7f2e71be24bb52 (patch) | |
tree | 889cd1ff57f57a884f4ce4f0413798fe08f20a80 /include/clang/Serialization | |
parent | 2e96511773c6a21291dfa5218eb8ba79f04b5318 (diff) |
With modules, we can end up loading a new module after we've seen an
arbitrary amount of code. This forces us to stage the AST writer more
strictly, ensuring that we don't assign a declaration ID to a
declaration until after we're certain that no more modules will get
loaded.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139974 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r-- | include/clang/Serialization/ASTWriter.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h index 1ecab72afa..13220f470e 100644 --- a/include/clang/Serialization/ASTWriter.h +++ b/include/clang/Serialization/ASTWriter.h @@ -97,6 +97,10 @@ private: /// \brief A listener object that receives notifications when certain /// entities are serialized. ASTSerializationListener *SerializationListener; + + /// \brief Indicates when the AST writing is actively performing + /// serialization, rather than just queueing updates. + bool WritingAST; /// \brief Stores a declaration or a type to be written to the AST file. class DeclOrType { @@ -251,11 +255,15 @@ private: struct ChainedObjCCategoriesData { /// \brief The interface in the imported module. const ObjCInterfaceDecl *Interface; - /// \brief ID of the interface. + /// \brief The local tail category ID that got chained to the imported + /// interface. + const ObjCCategoryDecl *TailCategory; + + /// \brief ID corresponding to \c Interface. serialization::DeclID InterfaceID; - /// \brief ID of the locally tail category ID that got chained to the - /// imported interface. - serialization::DeclID TailCatID; + + /// \brief ID corresponding to TailCategoryID. + serialization::DeclID TailCategoryID; }; /// \brief ObjC categories that got chained to an interface imported from /// another module. @@ -351,8 +359,10 @@ private: void WriteReferencedSelectorsPool(Sema &SemaRef); void WriteIdentifierTable(Preprocessor &PP, bool IsModule); void WriteAttributes(const AttrVec &Attrs, RecordDataImpl &Record); + void ResolveDeclUpdatesBlocks(); void WriteDeclUpdatesBlocks(); void WriteDeclReplacementsBlock(); + void ResolveChainedObjCCategories(); void WriteChainedObjCCategories(); void WriteDeclContextVisibleUpdate(const DeclContext *DC); void WriteFPPragmaOptions(const FPOptions &Opts); |