]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/CodeGen/BackendUtil.h
MFV r308265: Update tzdata to 2016i.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / CodeGen / BackendUtil.h
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/FunctionInfo.h"
15 #include <memory>
16
17 namespace llvm {
18   class Module;
19 }
20
21 namespace clang {
22   class DiagnosticsEngine;
23   class CodeGenOptions;
24   class TargetOptions;
25   class LangOptions;
26
27   enum BackendAction {
28     Backend_EmitAssembly,  ///< Emit native assembly files
29     Backend_EmitBC,        ///< Emit LLVM bitcode files
30     Backend_EmitLL,        ///< Emit human-readable LLVM assembly
31     Backend_EmitNothing,   ///< Don't emit anything (benchmarking mode)
32     Backend_EmitMCNull,    ///< Run CodeGen, but don't emit anything
33     Backend_EmitObj        ///< Emit native object files
34   };
35
36   void EmitBackendOutput(DiagnosticsEngine &Diags, const CodeGenOptions &CGOpts,
37                          const TargetOptions &TOpts, const LangOptions &LOpts,
38                          StringRef TDesc, llvm::Module *M, BackendAction Action,
39                          raw_pwrite_stream *OS);
40 }
41
42 #endif