1 //===--- BackendUtil.h - LLVM Backend Utilities -----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_CLANG_CODEGEN_BACKENDUTIL_H
11 #define LLVM_CLANG_CODEGEN_BACKENDUTIL_H
13 #include "clang/Basic/LLVM.h"
14 #include "llvm/IR/FunctionInfo.h"
22 class DiagnosticsEngine;
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
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);