clang  10.0.0svn
ObjectFilePCHContainerOperations.h
Go to the documentation of this file.
1 //===-- CodeGen/ObjectFilePCHContainerOperations.h - ------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_CODEGEN_OBJECT_FILE_PCH_CONTAINER_OPERATIONS_H
10 #define LLVM_CLANG_CODEGEN_OBJECT_FILE_PCH_CONTAINER_OPERATIONS_H
11 
13 
14 namespace clang {
15 
16 /// A PCHContainerWriter implementation that uses LLVM to
17 /// wraps Clang modules inside a COFF, ELF, or Mach-O container.
19  StringRef getFormat() const override { return "obj"; }
20 
21  /// 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(CompilerInstance &CI,
26  const std::string &MainFileName,
27  const std::string &OutputFileName,
28  std::unique_ptr<llvm::raw_pwrite_stream> OS,
29  std::shared_ptr<PCHBuffer> Buffer) const override;
30 };
31 
32 /// A PCHContainerReader implementation that uses LLVM to
33 /// wraps Clang modules inside a COFF, ELF, or Mach-O container.
35  StringRef getFormat() const override { return "obj"; }
36 
37  /// Returns the serialized AST inside the PCH container Buffer.
38  StringRef ExtractPCH(llvm::MemoryBufferRef Buffer) const override;
39 };
40 }
41 
42 #endif
A PCHContainerReader implementation that uses LLVM to wraps Clang modules inside a COFF...
This abstract interface provides operations for creating containers for serialized ASTs (precompiled ...
This abstract interface provides operations for unwrapping containers for serialized ASTs (precompile...
A PCHContainerWriter implementation that uses LLVM to wraps Clang modules inside a COFF...
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
Dataflow Directional Tag Classes.