]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/CodeGen/ObjectFilePCHContainerOperations.h
Update llvm/clang to r242221.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / CodeGen / ObjectFilePCHContainerOperations.h
1 //===-- CodeGen/ObjectFilePCHContainerOperations.h - ------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_CLANG_CODEGEN_OBJECT_FILE_PCH_CONTAINER_OPERATIONS_H
11 #define LLVM_CLANG_CODEGEN_OBJECT_FILE_PCH_CONTAINER_OPERATIONS_H
12
13 #include "clang/Frontend/PCHContainerOperations.h"
14
15 namespace clang {
16
17 /// \brief A PCHContainerOperations implementation that uses LLVM to
18 /// wraps Clang modules inside a COFF, ELF, or Mach-O container.
19 class ObjectFilePCHContainerOperations
20   : public PCHContainerOperations {
21   /// \brief Return an ASTConsumer that can be chained with a
22   /// PCHGenerator that produces a wrapper file format
23   /// that also contains full debug info for the module.
24   std::unique_ptr<ASTConsumer>
25     CreatePCHContainerGenerator(
26       DiagnosticsEngine &Diags, const HeaderSearchOptions &HSO,
27       const PreprocessorOptions &PPO, const TargetOptions &TO,
28       const LangOptions &LO, const std::string &MainFileName,
29       const std::string &OutputFileName, llvm::raw_pwrite_stream *OS,
30       std::shared_ptr<PCHBuffer> Buffer) const override;
31
32   /// \brief Initialize an llvm::BitstreamReader with the serialized
33   /// AST inside the PCH container Buffer.
34   void ExtractPCH(llvm::MemoryBufferRef Buffer,
35                   llvm::BitstreamReader &StreamFile) const override;
36
37
38 };
39
40 }
41
42
43 #endif