diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
| commit | 45b533945f0851ec234ca846e1af5ee1e4df0b6e (patch) | |
| tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /lib/Frontend/PCHContainerOperations.cpp | |
| parent | 7e86edd64bfae4e324224452e4ea879b3371a4bd (diff) | |
Notes
Diffstat (limited to 'lib/Frontend/PCHContainerOperations.cpp')
| -rw-r--r-- | lib/Frontend/PCHContainerOperations.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/lib/Frontend/PCHContainerOperations.cpp b/lib/Frontend/PCHContainerOperations.cpp index cde3ba139bcf4..5e1d772050987 100644 --- a/lib/Frontend/PCHContainerOperations.cpp +++ b/lib/Frontend/PCHContainerOperations.cpp @@ -16,6 +16,7 @@ #include "llvm/Bitcode/BitstreamReader.h" #include "llvm/Support/raw_ostream.h" #include "clang/Lex/ModuleLoader.h" + using namespace clang; namespace { @@ -26,17 +27,11 @@ class RawPCHContainerGenerator : public ASTConsumer { raw_pwrite_stream *OS; public: - RawPCHContainerGenerator(DiagnosticsEngine &Diags, - const HeaderSearchOptions &HSO, - const PreprocessorOptions &PPO, - const TargetOptions &TO, const LangOptions &LO, - const std::string &MainFileName, - const std::string &OutputFileName, - llvm::raw_pwrite_stream *OS, + RawPCHContainerGenerator(llvm::raw_pwrite_stream *OS, std::shared_ptr<PCHBuffer> Buffer) : Buffer(Buffer), OS(OS) {} - virtual ~RawPCHContainerGenerator() {} + ~RawPCHContainerGenerator() override = default; void HandleTranslationUnit(ASTContext &Ctx) override { if (Buffer->IsComplete) { @@ -49,16 +44,14 @@ public: Buffer->Data = std::move(Empty); } }; -} + +} // anonymous namespace std::unique_ptr<ASTConsumer> RawPCHContainerWriter::CreatePCHContainerGenerator( - DiagnosticsEngine &Diags, const HeaderSearchOptions &HSO, - const PreprocessorOptions &PPO, const TargetOptions &TO, - const LangOptions &LO, const std::string &MainFileName, + CompilerInstance &CI, const std::string &MainFileName, const std::string &OutputFileName, llvm::raw_pwrite_stream *OS, std::shared_ptr<PCHBuffer> Buffer) const { - return llvm::make_unique<RawPCHContainerGenerator>( - Diags, HSO, PPO, TO, LO, MainFileName, OutputFileName, OS, Buffer); + return llvm::make_unique<RawPCHContainerGenerator>(OS, Buffer); } void RawPCHContainerReader::ExtractPCH( |
