aboutsummaryrefslogtreecommitdiff
path: root/clang/tools/driver/cc1_main.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-06-20 18:53:08 +0000
committerAdrian Prantl <aprantl@apple.com>2015-06-20 18:53:08 +0000
commitbb165fb04db511d0f6927133662b74943f76cc39 (patch)
tree5c8150e9096c41f7a426c704aa4762e6420cd28e /clang/tools/driver/cc1_main.cpp
parent6ed81cbcdb6e5f07f6ac71a446d970c2db8945a5 (diff)
downloadllvm-bb165fb04db511d0f6927133662b74943f76cc39.zip
llvm-bb165fb04db511d0f6927133662b74943f76cc39.tar.gz
llvm-bb165fb04db511d0f6927133662b74943f76cc39.tar.bz2
Introduce a PCHContainerOperations interface (NFC).
A PCHContainerOperations abstract interface provides operations for creating and unwrapping containers for serialized ASTs (precompiled headers and clang modules). The default implementation is RawPCHContainerOperations, which uses a flat file for the output. The main application for this interface will be an ObjectFilePCHContainerOperations implementation that uses LLVM to wrap the module in an ELF/Mach-O/COFF container to store debug info alongside the AST. rdar://problem/20091852 llvm-svn: 240225
Diffstat (limited to 'clang/tools/driver/cc1_main.cpp')
-rw-r--r--clang/tools/driver/cc1_main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/tools/driver/cc1_main.cpp b/clang/tools/driver/cc1_main.cpp
index fa1a10e..972bf5b 100644
--- a/clang/tools/driver/cc1_main.cpp
+++ b/clang/tools/driver/cc1_main.cpp
@@ -14,6 +14,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Option/Arg.h"
+#include "clang/Frontend/PCHContainerOperations.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/Options.h"
#include "clang/Frontend/CompilerInstance.h"
@@ -64,7 +65,8 @@ void initializePollyPasses(llvm::PassRegistry &Registry);
#endif
int cc1_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) {
- std::unique_ptr<CompilerInstance> Clang(new CompilerInstance());
+ std::unique_ptr<CompilerInstance> Clang(
+ new CompilerInstance(std::make_shared<RawPCHContainerOperations>()));
IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
// Initialize targets first, so that --version shows registered targets.