clang: include/clang/CodeGen/BackendUtil.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_CLANG_CODEGEN_BACKENDUTIL_H

10#define LLVM_CLANG_CODEGEN_BACKENDUTIL_H

11

13#include "llvm/IR/ModuleSummaryIndex.h"

14#include

15

16namespace llvm {

17class BitcodeModule;

18template class Expected;

19template class IntrusiveRefCntPtr;

21class MemoryBufferRef;

22namespace vfs {

23class FileSystem;

24}

25}

26

28class CompilerInstance;

29class DiagnosticsEngine;

30class CodeGenOptions;

31class BackendConsumer;

32

41

42void emitBackendOutput(CompilerInstance &CI, StringRef TDesc, llvm::Module *M,

45 std::unique_ptr<raw_pwrite_stream> OS,

46 BackendConsumer *BC = nullptr);

47

48void EmbedBitcode(llvm::Module *M, const CodeGenOptions &CGOpts,

49 llvm::MemoryBufferRef Buf);

50

51void EmbedObject(llvm::Module *M, const CodeGenOptions &CGOpts,

52 DiagnosticsEngine &Diags);

53}

54

55#endif

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(CompilerInstance &CI, 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.