summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-08-17 07:13:32 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-08-17 07:13:32 +0000
commite75ee0f0c8f8cf603c7894f9442f81faf11c2ff6 (patch)
tree9ff53065671bce8db52fea63c808f9494098b614 /clang/lib/Frontend
parent88edc8243d6d0c4f091d9f99e8916b0b52b456a2 (diff)
downloadbcm5719-llvm-e75ee0f0c8f8cf603c7894f9442f81faf11c2ff6.tar.gz
bcm5719-llvm-e75ee0f0c8f8cf603c7894f9442f81faf11c2ff6.zip
[modules] When explicitly building a module file, don't include timestamps in
the produced pcm file for stable file creation across distributed build systems. llvm-svn: 245199
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp1
-rw-r--r--clang/lib/Frontend/FrontendActions.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index c678da982ed..5079353226c 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -913,6 +913,7 @@ static bool compileModuleImpl(CompilerInstance &ImportingInstance,
FrontendOpts.OutputFile = ModuleFileName.str();
FrontendOpts.DisableFree = false;
FrontendOpts.GenerateGlobalModuleIndex = false;
+ FrontendOpts.BuildingImplicitModule = true;
FrontendOpts.Inputs.clear();
InputKind IK = getSourceInputKindFromOptions(*Invocation->getLangOpts());
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp
index 057361811ba..782b713d3e2 100644
--- a/clang/lib/Frontend/FrontendActions.cpp
+++ b/clang/lib/Frontend/FrontendActions.cpp
@@ -137,7 +137,9 @@ GenerateModuleAction::CreateASTConsumer(CompilerInstance &CI,
auto Buffer = std::make_shared<PCHBuffer>();
std::vector<std::unique_ptr<ASTConsumer>> Consumers;
Consumers.push_back(llvm::make_unique<PCHGenerator>(
- CI.getPreprocessor(), OutputFile, Module, Sysroot, Buffer));
+ CI.getPreprocessor(), OutputFile, Module, Sysroot, Buffer,
+ /*AllowASTWithErrors*/false,
+ /*IncludeTimestamps*/+CI.getFrontendOpts().BuildingImplicitModule));
Consumers.push_back(
CI.getPCHContainerWriter().CreatePCHContainerGenerator(
CI.getDiagnostics(), CI.getHeaderSearchOpts(),
OpenPOWER on IntegriCloud