aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-07-17 01:19:54 +0000
committerAdrian Prantl <aprantl@apple.com>2015-07-17 01:19:54 +0000
commitfb2398d0c43405a6b654c80560e38fb3ccd134b9 (patch)
treee1a0f288169e920a3ac6d9f2aaece67eb7796bf1 /clang/lib/Frontend/FrontendActions.cpp
parentcabe02e14110526189a0935d172f8547f0232572 (diff)
downloadllvm-fb2398d0c43405a6b654c80560e38fb3ccd134b9.zip
llvm-fb2398d0c43405a6b654c80560e38fb3ccd134b9.tar.gz
llvm-fb2398d0c43405a6b654c80560e38fb3ccd134b9.tar.bz2
Make the clang module container format selectable from the command line.
- introduces a new cc1 option -fmodule-format=[raw,obj] with 'raw' being the default - supports arbitrary module container formats that libclang is agnostic to - adds the format to the module hash to avoid collisions - splits the old PCHContainerOperations into PCHContainerWriter and a PCHContainerReader. Thanks to Richard Smith for reviewing this patch! llvm-svn: 242499
Diffstat (limited to 'clang/lib/Frontend/FrontendActions.cpp')
-rw-r--r--clang/lib/Frontend/FrontendActions.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp
index 4997764..40277bd 100644
--- a/clang/lib/Frontend/FrontendActions.cpp
+++ b/clang/lib/Frontend/FrontendActions.cpp
@@ -93,7 +93,7 @@ GeneratePCHAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
Consumers.push_back(llvm::make_unique<PCHGenerator>(
CI.getPreprocessor(), OutputFile, nullptr, Sysroot, Buffer));
Consumers.push_back(
- CI.getPCHContainerOperations()->CreatePCHContainerGenerator(
+ CI.getPCHContainerWriter().CreatePCHContainerGenerator(
CI.getDiagnostics(), CI.getHeaderSearchOpts(),
CI.getPreprocessorOpts(), CI.getTargetOpts(), CI.getLangOpts(),
InFile, OutputFile, OS, Buffer));
@@ -139,7 +139,7 @@ GenerateModuleAction::CreateASTConsumer(CompilerInstance &CI,
Consumers.push_back(llvm::make_unique<PCHGenerator>(
CI.getPreprocessor(), OutputFile, Module, Sysroot, Buffer));
Consumers.push_back(
- CI.getPCHContainerOperations()->CreatePCHContainerGenerator(
+ CI.getPCHContainerWriter().CreatePCHContainerGenerator(
CI.getDiagnostics(), CI.getHeaderSearchOpts(),
CI.getPreprocessorOpts(), CI.getTargetOpts(), CI.getLangOpts(),
InFile, OutputFile, OS, Buffer));
@@ -415,7 +415,7 @@ void VerifyPCHAction::ExecuteAction() {
bool Preamble = CI.getPreprocessorOpts().PrecompiledPreambleBytes.first != 0;
const std::string &Sysroot = CI.getHeaderSearchOpts().Sysroot;
std::unique_ptr<ASTReader> Reader(new ASTReader(
- CI.getPreprocessor(), CI.getASTContext(), *CI.getPCHContainerOperations(),
+ CI.getPreprocessor(), CI.getASTContext(), CI.getPCHContainerReader(),
Sysroot.empty() ? "" : Sysroot.c_str(),
/*DisableValidation*/ false,
/*AllowPCHWithCompilerErrors*/ false,
@@ -578,7 +578,7 @@ void DumpModuleInfoAction::ExecuteAction() {
DumpModuleInfoListener Listener(Out);
ASTReader::readASTFileControlBlock(
getCurrentFile(), getCompilerInstance().getFileManager(),
- *getCompilerInstance().getPCHContainerOperations(), Listener);
+ getCompilerInstance().getPCHContainerReader(), Listener);
}
//===----------------------------------------------------------------------===//