clang  3.8.0
ObjectFilePCHContainerOperations.h
Go to the documentation of this file.
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 
14 
15 namespace clang {
16 
17 /// A PCHContainerWriter implementation that uses LLVM to
18 /// wraps Clang modules inside a COFF, ELF, or Mach-O container.
20  StringRef getFormat() const override { return "obj"; }
21 
22  /// Return an ASTConsumer that can be chained with a
23  /// PCHGenerator that produces a wrapper file format
24  /// that also contains full debug info for the module.
25  std::unique_ptr<ASTConsumer> CreatePCHContainerGenerator(
26  CompilerInstance &CI, const std::string &MainFileName,
27  const std::string &OutputFileName, llvm::raw_pwrite_stream *OS,
28  std::shared_ptr<PCHBuffer> Buffer) const override;
29 };
30 
31 /// A PCHContainerReader implementation that uses LLVM to
32 /// wraps Clang modules inside a COFF, ELF, or Mach-O container.
34  StringRef getFormat() const override { return "obj"; }
35 
36  /// Initialize an llvm::BitstreamReader with the serialized
37  /// AST inside the PCH container Buffer.
38  void ExtractPCH(llvm::MemoryBufferRef Buffer,
39  llvm::BitstreamReader &StreamFile) const override;
40 };
41 }
42 
43 #endif
std::unique_ptr< llvm::MemoryBuffer > Buffer
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.