When writing a module file, pass the module through to the AST
writer. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145479 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp
index 418dbf4..0cbcde5 100644
--- a/lib/Frontend/FrontendActions.cpp
+++ b/lib/Frontend/FrontendActions.cpp
@@ -86,8 +86,7 @@
if (!CI.getFrontendOpts().RelocatablePCH)
Sysroot.clear();
- return new PCHGenerator(CI.getPreprocessor(), OutputFile, /*Module=*/false,
- Sysroot, OS);
+ return new PCHGenerator(CI.getPreprocessor(), OutputFile, 0, Sysroot, OS);
}
bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI,
@@ -122,7 +121,7 @@
if (ComputeASTConsumerArguments(CI, InFile, Sysroot, OutputFile, OS))
return 0;
- return new PCHGenerator(CI.getPreprocessor(), OutputFile, /*MakeModule=*/true,
+ return new PCHGenerator(CI.getPreprocessor(), OutputFile, Module,
Sysroot, OS);
}
@@ -184,8 +183,7 @@
}
// Dig out the module definition.
- ModuleMap::Module *Module = HS.getModule(CI.getLangOpts().CurrentModule,
- /*AllowSearch=*/false);
+ Module = HS.getModule(CI.getLangOpts().CurrentModule, /*AllowSearch=*/false);
if (!Module) {
CI.getDiagnostics().Report(diag::err_missing_module)
<< CI.getLangOpts().CurrentModule << Filename;