clang  6.0.0svn
BackendUtil.h
Go to the documentation of this file.
1 //===--- BackendUtil.h - LLVM Backend Utilities -----------------*- 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_BACKENDUTIL_H
11 #define LLVM_CLANG_CODEGEN_BACKENDUTIL_H
12 
13 #include "clang/Basic/LLVM.h"
14 #include "llvm/IR/ModuleSummaryIndex.h"
15 #include <memory>
16 
17 namespace llvm {
18  class BitcodeModule;
19  template <typename T> class Expected;
20  class Module;
21  class MemoryBufferRef;
22 }
23 
24 namespace clang {
25  class DiagnosticsEngine;
26  class HeaderSearchOptions;
27  class CodeGenOptions;
28  class TargetOptions;
29  class LangOptions;
30 
32  Backend_EmitAssembly, ///< Emit native assembly files
33  Backend_EmitBC, ///< Emit LLVM bitcode files
34  Backend_EmitLL, ///< Emit human-readable LLVM assembly
35  Backend_EmitNothing, ///< Don't emit anything (benchmarking mode)
36  Backend_EmitMCNull, ///< Run CodeGen, but don't emit anything
37  Backend_EmitObj ///< Emit native object files
38  };
39 
41  const CodeGenOptions &CGOpts,
42  const TargetOptions &TOpts, const LangOptions &LOpts,
43  const llvm::DataLayout &TDesc, llvm::Module *M,
44  BackendAction Action,
45  std::unique_ptr<raw_pwrite_stream> OS);
46 
47  void EmbedBitcode(llvm::Module *M, const CodeGenOptions &CGOpts,
48  llvm::MemoryBufferRef Buf);
49 
51  FindThinLTOModule(llvm::MemoryBufferRef MBRef);
52 }
53 
54 #endif
Emit human-readable LLVM assembly.
Definition: BackendUtil.h:34
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
Definition: Dominators.h:26
Run CodeGen, but don&#39;t emit anything.
Definition: BackendUtil.h:36
Don&#39;t emit anything (benchmarking mode)
Definition: BackendUtil.h:35
Options for controlling the target.
Definition: TargetOptions.h:26
Emit LLVM bitcode files.
Definition: BackendUtil.h:33
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:48
BackendAction
Definition: BackendUtil.h:31
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:147
Emit native object files.
Definition: BackendUtil.h:37
Emit native assembly files.
Definition: BackendUtil.h:32
void EmbedBitcode(llvm::Module *M, const CodeGenOptions &CGOpts, llvm::MemoryBufferRef Buf)
Dataflow Directional Tag Classes.
void EmitBackendOutput(DiagnosticsEngine &Diags, const HeaderSearchOptions &, const CodeGenOptions &CGOpts, const TargetOptions &TOpts, const LangOptions &LOpts, const llvm::DataLayout &TDesc, llvm::Module *M, BackendAction Action, std::unique_ptr< raw_pwrite_stream > OS)
llvm::Expected< llvm::BitcodeModule > FindThinLTOModule(llvm::MemoryBufferRef MBRef)
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
HeaderSearchOptions - Helper class for storing options related to the initialization of the HeaderSea...