diff options
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 81cb5262098..836d21b2047 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -1360,8 +1360,10 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, "__import_module__ " + PathString.str().str() + ";"); // Load the module. - // FIXME: Deal with __include_macros here. - TheModuleLoader.loadModule(IncludeTok.getLocation(), Path); + // If this was an #__include_macros directive, only make macros visible. + Module::NameVisibilityKind Visibility + = (IncludeKind == 3)? Module::MacrosVisible : Module::AllVisible; + TheModuleLoader.loadModule(IncludeTok.getLocation(), Path, Visibility); return; } |