[modules] Remove dead code from Module for tracking macro import locations.
llvm-svn: 236376
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index 7de6c14..e1a67f9 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -1680,12 +1680,11 @@
ReplaceRange, ("@import " + PathString + ";").str());
}
- // Load the module. Only make macros visible. We'll make the declarations
+ // Load the module to import its macros. We'll make the declarations
// visible when the parser gets here.
- Module::NameVisibilityKind Visibility = Module::MacrosVisible;
- ModuleLoadResult Imported
- = TheModuleLoader.loadModule(IncludeTok.getLocation(), Path, Visibility,
- /*IsIncludeDirective=*/true);
+ ModuleLoadResult Imported = TheModuleLoader.loadModule(
+ IncludeTok.getLocation(), Path, Module::Hidden,
+ /*IsIncludeDirective=*/true);
if (Imported)
makeModuleVisible(Imported, IncludeTok.getLocation());
assert((Imported == nullptr || Imported == SuggestedModule.getModule()) &&
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 1251e98..21dccd1 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -752,7 +752,7 @@
if (getLangOpts().Modules) {
Imported = TheModuleLoader.loadModule(ModuleImportLoc,
ModuleImportPath,
- Module::MacrosVisible,
+ Module::Hidden,
/*IsIncludeDirective=*/false);
if (Imported)
makeModuleVisible(Imported, ModuleImportLoc);