aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Serialization
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-12-01 17:11:21 +0000
committerDouglas Gregor <dgregor@apple.com>2011-12-01 17:11:21 +0000
commit5e35693721364673f8196e4f5a370f56b92e6053 (patch)
tree7de6955b4b607db6fb559ced4e3c710c2318ef75 /include/clang/Serialization
parentee5a21fda5efce750c21db5a1d635c9742f5859b (diff)
Introduce the notion of name visibility into modules. For a given
(sub)module, all of the names may be hidden, just the macro names may be exposed (for example, after the preprocessor has seen the import of the module but the parser has not), or all of the names may be exposed. Importing a module makes its names, and the names in any of its non-explicit submodules, visible to name lookup (transitively). This commit only introduces the notion of name visible and marks modules and submodules as visible when they are imported. The actual name-hiding logic in the AST reader will follow (along with test cases). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145586 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r--include/clang/Serialization/ASTReader.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h
index 0e659acfa0..3f66eb5118 100644
--- a/include/clang/Serialization/ASTReader.h
+++ b/include/clang/Serialization/ASTReader.h
@@ -803,6 +803,16 @@ public:
/// the actual file in the file system.
ASTReadResult validateFileEntries(ModuleFile &M);
+ /// \brief Make the entities in the given module and any of its (non-explicit)
+ /// submodules visible to name lookup.
+ ///
+ /// \param Mod The module whose names should be made visible.
+ ///
+ /// \param Visibility The level of visibility to give the names in the module.
+ /// Visibility can only be increased over time.
+ void makeModuleVisible(Module *Mod,
+ Module::NameVisibilityKind NameVisibility);
+
/// \brief Set the AST callbacks listener.
void setListener(ASTReaderListener *listener) {
Listener.reset(listener);