From bcfc7d02293691a1050b76be2c99e008469644f9 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 2 Dec 2011 23:42:12 +0000 Subject: When we treat an #include or #import as a module import, create an implicit ImportDecl in the translation unit to record the presence of the import. llvm-svn: 145727 --- clang/lib/Lex/PPDirectives.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Lex/PPDirectives.cpp') diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 836d21b2047..b44a0a2934f 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -1363,7 +1363,8 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, // 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); + TheModuleLoader.loadModule(IncludeTok.getLocation(), Path, Visibility, + /*IsIncludeDirective=*/true); return; } -- cgit v1.2.3