9#ifndef LLVM_CLANG_CODEGEN_BACKENDUTIL_H
10#define LLVM_CLANG_CODEGEN_BACKENDUTIL_H
13#include "llvm/IR/ModuleSummaryIndex.h"
18 template <
typename T>
class Expected;
19 template <
typename T>
class IntrusiveRefCntPtr;
21 class MemoryBufferRef;
28 class DiagnosticsEngine;
29 class HeaderSearchOptions;
33 class BackendConsumer;
45 const CodeGenOptions &CGOpts,
46 const TargetOptions &TOpts,
const LangOptions &LOpts,
49 std::unique_ptr<raw_pwrite_stream> OS,
50 BackendConsumer *BC =
nullptr);
52 void EmbedBitcode(llvm::Module *M,
const CodeGenOptions &CGOpts,
53 llvm::MemoryBufferRef Buf);
55 void EmbedObject(llvm::Module *M,
const CodeGenOptions &CGOpts,
56 DiagnosticsEngine &Diags);
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
The JSON file list parser is used to communicate input to InstallAPI.
void EmbedObject(llvm::Module *M, const CodeGenOptions &CGOpts, DiagnosticsEngine &Diags)
void EmitBackendOutput(DiagnosticsEngine &Diags, const HeaderSearchOptions &, const CodeGenOptions &CGOpts, const TargetOptions &TOpts, const LangOptions &LOpts, StringRef TDesc, llvm::Module *M, BackendAction Action, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > VFS, std::unique_ptr< raw_pwrite_stream > OS, BackendConsumer *BC=nullptr)
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...
void EmbedBitcode(llvm::Module *M, const CodeGenOptions &CGOpts, llvm::MemoryBufferRef Buf)
@ Backend_EmitAssembly
Emit native assembly files.
@ Backend_EmitLL
Emit human-readable LLVM assembly.
@ Backend_EmitBC
Emit LLVM bitcode files.
@ Backend_EmitObj
Emit native object files.
@ Backend_EmitMCNull
Run CodeGen, but don't emit anything.
@ Backend_EmitNothing
Don't emit anything (benchmarking mode)
Diagnostic wrappers for TextAPI types for error reporting.