LLVM: include/llvm/DWARFLinker/DWARFLinkerBase.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_DWARFLINKER_DWARFLINKERBASE_H

10#define LLVM_DWARFLINKER_DWARFLINKERBASE_H

21#include

22namespace llvm {

24

26

27

53

56

58 "debug_info", "debug_line", "debug_frame", "debug_ranges",

59 "debug_rnglists", "debug_loc", "debug_loclists", "debug_aranges",

60 "debug_abbrev", "debug_macinfo", "debug_macro", "debug_addr",

61 "debug_str", "debug_line_str", "debug_str_offsets", "debug_pubnames",

62 "debug_pubtypes", "debug_names", "apple_names", "apple_namespac",

63 "apple_objc", "apple_types"};

64

65

70

71

73

74

76public:

87

92

98

99

100

101

102

103

104

108

109

111

112

114

116

118

120

122

123

125

127

129

131

133

135

136 virtual void

138

140

142

144};

145}

146}

147#endif

This file defines the DenseMap class.

ppc ctr loops PowerPC CTR Loops Verify

A structured debug information entry.

Utility class that carries the DWARF compile/type unit and the debug info entry in an object.

Lightweight error class with error context and mandatory checking.

SectionKind - This is a simple POD value that classifies the properties of a section.

A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...

StringRef - Represent a constant reference to a string, i.e.

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

This class represents DWARF information for source file and it's address map.

The base interface for DWARFLinker implementations.

Definition DWARFLinkerBase.h:75

virtual void setNumThreads(unsigned NumThreads)=0

Use specified number of threads for parallel files linking.

std::map< std::string, std::string > ObjectPrefixMapTy

Definition DWARFLinkerBase.h:84

virtual void addObjectFile(DWARFFile &File, ObjFileLoaderTy Loader=nullptr, CompileUnitHandlerTy OnCUDieLoaded=[](const DWARFUnit &) {})=0

Add an object file to be linked.

virtual void setEstimatedObjfilesAmount(unsigned ObjFilesNum)=0

Set estimated objects files amount, for preliminary data allocation.

virtual void setKeepFunctionForStatic(bool KeepFunctionForStatic)=0

Set whether to keep the enclosing function for a static variable.

virtual ~DWARFLinkerBase()=default

virtual void setAllowNonDeterministicOutput(bool)=0

Allows generating non-deterministic output in exchange for more parallelism.

virtual void setSwiftInterfacesMap(SwiftInterfacesMapTy *Map)=0

Set map for Swift interfaces.

function_ref< void(const DWARFUnit &Unit)> CompileUnitHandlerTy

Definition DWARFLinkerBase.h:85

virtual Error link()=0

Link the debug info for all object files added through calls to addObjectFile.

std::function< void( const Twine &Warning, StringRef Context, const DWARFDie *DIE)> MessageHandlerTy

Definition DWARFLinkerBase.h:78

virtual void setObjectPrefixMap(ObjectPrefixMapTy *Map)=0

Set prefix map for objects.

virtual void addAccelTableKind(AccelTableKind Kind)=0

Add kind of accelerator tables to be generated.

virtual void setVerbosity(bool Verbose)=0

A number of methods setting various linking options: Enable logging to standard output.

virtual Error setTargetDWARFVersion(uint16_t TargetDWARFVersion)=0

Set target DWARF version.

AccelTableKind

The kind of accelerator tables to be emitted.

Definition DWARFLinkerBase.h:93

@ DebugNames

.debug_names.

Definition DWARFLinkerBase.h:96

@ Apple

.apple_names, .apple_namespaces, .apple_types, .apple_objc.

Definition DWARFLinkerBase.h:94

@ Pub

.debug_pubnames, .debug_pubtypes

Definition DWARFLinkerBase.h:95

virtual void setVerifyInputDWARF(bool Verify)=0

Verify the input DWARF.

virtual void setUpdateIndexTablesOnly(bool Update)=0

Update index tables only (do not modify rest of DWARF).

virtual void setStatistics(bool Statistics)=0

Print statistics to standard output.

std::map< std::string, std::string > SwiftInterfacesMapTy

Definition DWARFLinkerBase.h:86

OutputFileType

Type of output file.

Definition DWARFLinkerBase.h:88

@ Object

Definition DWARFLinkerBase.h:89

@ Assembly

Definition DWARFLinkerBase.h:90

std::function< ErrorOr< DWARFFile & >( StringRef ContainerName, StringRef Path)> ObjFileLoaderTy

Definition DWARFLinkerBase.h:80

std::function< void(const DWARFFile &File, llvm::StringRef Output)> InputVerificationHandlerTy

Definition DWARFLinkerBase.h:82

virtual void setPrependPath(StringRef Ppath)=0

Set prepend path for clang modules.

virtual void setInputVerificationHandler(InputVerificationHandlerTy Handler)=0

Set verification handler used to report verification errors.

virtual void setNoODR(bool NoODR)=0

Do not unique types according to ODR.

An efficient, type-erasing, non-owning reference to a callable.

static constexpr StringLiteral SectionNames[SectionKindsNum]

Definition DWARFLinkerBase.h:57

LLVM_ABI std::optional< DebugSectionKind > parseDebugTableName(StringRef Name)

Recognise the table name and match it with the DebugSectionKind.

static constexpr const StringLiteral & getSectionName(DebugSectionKind SectionKind)

Return the name of the section.

Definition DWARFLinkerBase.h:67

DebugSectionKind

List of tracked debug tables.

Definition DWARFLinkerBase.h:28

@ DebugLocLists

Definition DWARFLinkerBase.h:35

@ AppleTypes

Definition DWARFLinkerBase.h:50

@ DebugNames

Definition DWARFLinkerBase.h:46

@ DebugMacinfo

Definition DWARFLinkerBase.h:38

@ DebugARanges

Definition DWARFLinkerBase.h:36

@ AppleNames

Definition DWARFLinkerBase.h:47

@ DebugRange

Definition DWARFLinkerBase.h:32

@ DebugLine

Definition DWARFLinkerBase.h:30

@ DebugAbbrev

Definition DWARFLinkerBase.h:37

@ AppleObjC

Definition DWARFLinkerBase.h:49

@ AppleNamespaces

Definition DWARFLinkerBase.h:48

@ DebugRngLists

Definition DWARFLinkerBase.h:33

@ DebugPubTypes

Definition DWARFLinkerBase.h:45

@ DebugPubNames

Definition DWARFLinkerBase.h:44

@ DebugLoc

Definition DWARFLinkerBase.h:34

@ DebugLineStr

Definition DWARFLinkerBase.h:42

@ DebugMacro

Definition DWARFLinkerBase.h:39

@ DebugStr

Definition DWARFLinkerBase.h:41

@ NumberOfEnumEntries

Definition DWARFLinkerBase.h:51

@ DebugAddr

Definition DWARFLinkerBase.h:40

@ DebugFrame

Definition DWARFLinkerBase.h:31

@ DebugInfo

Definition DWARFLinkerBase.h:29

@ DebugStrOffsets

Definition DWARFLinkerBase.h:43

static constexpr size_t SectionKindsNum

Definition DWARFLinkerBase.h:54

This is an optimization pass for GlobalISel generic memory operations.