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

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_CLANG_CODEGEN_MODULEBUILDER_H

14#define LLVM_CLANG_CODEGEN_MODULEBUILDER_H

15

18#include "llvm/ADT/StringRef.h"

19

20namespace llvm {

21 class Constant;

22 class LLVMContext;

24 class StringRef;

25

26 namespace vfs {

27 class FileSystem;

28 }

29}

30

31

32inline constexpr llvm::StringRef ClangTrapPrefix = "__clang_trap_msg";

33

35 class CodeGenOptions;

36 class CoverageSourceInfo;

37 class Decl;

38 class DiagnosticsEngine;

39 class GlobalDecl;

40 class HeaderSearchOptions;

41 class LangOptions;

42 class PreprocessorOptions;

43

44namespace CodeGen {

45 class CodeGenModule;

46 class CGDebugInfo;

47}

48

49

50

51

53 virtual void anchor();

54

55public:

56

57

58

60

61

62

63

64

65

66

67

68

70

71

72

73

74

76

77

79

80

81

82

83

85

86

87

89

90

91

92

93

94

95

96

97

99

100

101

102 llvm::Module* StartModule(llvm::StringRef ModuleName, llvm::LLVMContext &C);

103};

104

105

106

107

109 llvm::StringRef ModuleName,

114 llvm::LLVMContext &C,

116

117}

118

119#endif

Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.

constexpr llvm::StringRef ClangTrapPrefix

ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs.

CodeGenOptions - Track various options which control how the code is optimized and passed to the back...

This class gathers all debug information during compilation and is responsible for emitting to llvm g...

This class organizes the cross-function state that is used while generating LLVM code.

The primary public interface to the Clang code generator.

llvm::Module * ReleaseModule()

Release ownership of the module to the caller.

const Decl * GetDeclForMangledName(llvm::StringRef MangledName)

Given a mangled name, return a declaration which mangles that way which has been added to this code g...

llvm::Module * StartModule(llvm::StringRef ModuleName, llvm::LLVMContext &C)

Create a new llvm::Module after calling HandleTranslationUnit.

llvm::Constant * GetAddrOfGlobal(GlobalDecl decl, bool isForDefinition)

Return the LLVM address of the given global entity.

llvm::StringRef GetMangledName(GlobalDecl GD)

Given a global declaration, return a mangled name for this declaration which has been added to this c...

CodeGen::CGDebugInfo * getCGDebugInfo()

Return debug info code generator.

CodeGen::CodeGenModule & CGM()

Return an opaque reference to the CodeGenModule object, which can be used in various secondary APIs.

llvm::Module * GetModule()

Return the module that this code generator is building into.

Stores additional source code information like skipped ranges which is required by the coverage mappi...

Decl - This represents one declaration (or definition), e.g.

Concrete class used by the front-end to report problems and issues.

GlobalDecl - represents a global declaration.

PreprocessorOptions - This class is used for passing the various options used in preprocessor initial...

const internal::VariadicAllOfMatcher< Decl > decl

Matches declarations.

The JSON file list parser is used to communicate input to InstallAPI.

CodeGenerator * CreateLLVMCodeGen(DiagnosticsEngine &Diags, llvm::StringRef ModuleName, IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS, const HeaderSearchOptions &HeaderSearchOpts, const PreprocessorOptions &PreprocessorOpts, const CodeGenOptions &CGO, llvm::LLVMContext &C, CoverageSourceInfo *CoverageInfo=nullptr)

CreateLLVMCodeGen - Create a CodeGenerator instance.

@ Module

Module linkage, which indicates that the entity can be referred to from other translation units withi...

Diagnostic wrappers for TextAPI types for error reporting.