diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-01 17:11:21 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-01 17:11:21 +0000 |
commit | ff2be53f8f15a74f044d95b70706ec0d9dcace5f (patch) | |
tree | a6df83747b5f531742fff0e1fc258c0f21192f8c /clang/lib/Lex/Preprocessor.cpp | |
parent | 719051e1c6ba05f45f3c83124354bc856bd59e8f (diff) | |
download | bcm5719-llvm-ff2be53f8f15a74f044d95b70706ec0d9dcace5f.tar.gz bcm5719-llvm-ff2be53f8f15a74f044d95b70706ec0d9dcace5f.zip |
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).
llvm-svn: 145586
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index b01113041eb..180e1e2c258 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -593,7 +593,8 @@ void Preprocessor::LexAfterModuleImport(Token &Result) { // If we have a non-empty module path, load the named module. if (!ModuleImportPath.empty()) - (void)TheModuleLoader.loadModule(ModuleImportLoc, ModuleImportPath); + (void)TheModuleLoader.loadModule(ModuleImportLoc, ModuleImportPath, + Module::MacrosVisible); } void Preprocessor::AddCommentHandler(CommentHandler *Handler) { |