summaryrefslogtreecommitdiffstats
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-06-30 21:29:55 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-06-30 21:29:55 +0000
commit1f3612abf43d6b5f56d6c52f8dc682f3ba346c4d (patch)
tree76862b48a5ebfeff3ec9d9450207f09b6203a86f /include/clang/Lex/Preprocessor.h
parent396b8ddda7d8170a33058a4a6cdcbd85d84f6560 (diff)
[modules] Make sure macros get made visible in the top-level file if we've got
local submodule visibility enabled; that top-level file might not actually be the module includes buffer if use of prebuilt modules is disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index f02364a385..bba0c38cec 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -394,7 +394,9 @@ class Preprocessor : public RefCountedBase<Preprocessor> {
const IdentifierInfo *II) const {
// FIXME: Find a spare bit on IdentifierInfo and store a
// HasModuleMacros flag.
- if (!II->hasMacroDefinition() || !PP.getLangOpts().Modules ||
+ if (!II->hasMacroDefinition() ||
+ (!PP.getLangOpts().Modules &&
+ !PP.getLangOpts().ModulesLocalVisibility) ||
!PP.CurSubmoduleState->VisibleModules.getGeneration())
return nullptr;