diff options
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/AST/DeclBase.h | 1 | ||||
-rw-r--r-- | include/clang/Serialization/ASTReader.h | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index 313cf606b8..ab36054969 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -278,6 +278,7 @@ protected: friend class ASTDeclWriter; friend class ASTDeclReader; + friend class ASTReader; private: void CheckAccessDeclContext() const; diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 3f66eb5118..bbcead0911 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -383,6 +383,15 @@ private: /// global submodule ID to produce a local ID. GlobalSubmoduleMapType GlobalSubmoduleMap; + /// \brief A set of hidden declarations. + typedef llvm::SmallVector<Decl *, 2> HiddenNames; + + typedef llvm::DenseMap<Module *, HiddenNames> HiddenNamesMapType; + + /// \brief A mapping from each of the hidden submodules to the deserialized + /// declarations in that submodule that could be made visible. + HiddenNamesMapType HiddenNamesMap; + /// \brief A vector containing selectors that have already been loaded. /// /// This vector is indexed by the Selector ID (-1). NULL selector @@ -813,6 +822,9 @@ public: void makeModuleVisible(Module *Mod, Module::NameVisibilityKind NameVisibility); + /// \brief Make the names within this set of hidden names visible. + void makeNamesVisible(const HiddenNames &Names); + /// \brief Set the AST callbacks listener. void setListener(ASTReaderListener *listener) { Listener.reset(listener); @@ -829,6 +841,13 @@ public: ModuleMgr.addInMemoryBuffer(FileName, Buffer); } + /// \brief Finalizes the AST reader's state before writing an AST file to + /// disk. + /// + /// This operation may undo temporary state in the AST that should not be + /// emitted. + void finalizeForWriting(); + /// \brief Retrieve the module manager. ModuleManager &getModuleManager() { return ModuleMgr; } |