LLVM: lib/DebugInfo/CodeView/DebugLinesSubsection.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

17#include

18#include

19

20using namespace llvm;

22

28 return EC;

31 BlockHeader->NumLines *

35 "Invalid line block record size");

37 if (LineInfoSize > Size)

39 "Invalid line block record size");

40

41

42 Len = BlockHeader->BlockSize;

43 Item.NameIndex = BlockHeader->NameIndex;

45 return EC;

46 if (HasColumn) {

48 return EC;

49 }

51}

52

55

58 return EC;

59

60 LinesAndColumns.getExtractor().Header = Header;

62 return EC;

63

65}

66

70

74

80

82 Block &B = Blocks.back();

86 B.Lines.push_back(LNE);

87}

88

93 Block &B = Blocks.back();

94 assert(B.Lines.size() == B.Columns.size());

95

100 B.Columns.push_back(CNE);

101}

102

107 Header.RelocOffset = RelocOffset;

108 Header.RelocSegment = RelocSegment;

109

111 return EC;

112

113 for (const auto &B : Blocks) {

115 assert(B.Lines.size() == B.Columns.size() || B.Columns.empty());

116

117 BlockHeader.NumLines = B.Lines.size();

119 BlockHeader.BlockSize += BlockHeader.NumLines * sizeof(LineNumberEntry);

121 BlockHeader.BlockSize += BlockHeader.NumLines * sizeof(ColumnNumberEntry);

122 BlockHeader.NameIndex = B.ChecksumBufferOffset;

124 return EC;

125

127 return EC;

128

131 return EC;

132 }

133 }

135}

136

139 for (const auto &B : Blocks) {

144 }

146}

147

150 RelocOffset = Offset;

151 RelocSegment = Segment;

152}

153

155

157

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

Provides read only access to a subclass of BinaryStream.

Error readObject(const T *&Dest)

Get a pointer to an object of type T from the underlying stream, as if by memcpy, and store the resul...

uint64_t bytesRemaining() const

Error readArray(ArrayRef< T > &Array, uint32_t NumElements)

Get a reference to a NumElements element array of objects of type T from the underlying stream as if ...

BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.

Provides write only access to a subclass of WritableBinaryStream.

Error writeArray(ArrayRef< T > Array)

Writes an array of objects of type T to the underlying stream, as if by using memcpy.

Error writeObject(const T &Obj)

Writes the object Obj to the underlying stream, as if by using memcpy.

Lightweight error class with error context and mandatory checking.

static ErrorSuccess success()

Create a success value.

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

LLVM_ABI bool hasColumnInfo() const

Definition DebugLinesSubsection.cpp:67

LLVM_ABI DebugLinesSubsectionRef()

Definition DebugLinesSubsection.cpp:53

LLVM_ABI Error initialize(BinaryStreamReader Reader)

Definition DebugLinesSubsection.cpp:56

void setRelocationAddress(uint16_t Segment, uint32_t Offset)

Definition DebugLinesSubsection.cpp:148

DebugLinesSubsection(DebugChecksumsSubsection &Checksums, DebugStringTableSubsection &Strings)

Definition DebugLinesSubsection.cpp:71

void setCodeSize(uint32_t Size)

Definition DebugLinesSubsection.cpp:154

bool hasColumnInfo() const

Definition DebugLinesSubsection.cpp:158

void addLineInfo(uint32_t Offset, const LineInfo &Line)

Definition DebugLinesSubsection.cpp:81

void setFlags(LineFlags Flags)

Definition DebugLinesSubsection.cpp:156

Error commit(BinaryStreamWriter &Writer) const override

Definition DebugLinesSubsection.cpp:103

void addLineAndColumnInfo(uint32_t Offset, const LineInfo &Line, uint32_t ColStart, uint32_t ColEnd)

Definition DebugLinesSubsection.cpp:89

void createBlock(StringRef FileName)

Definition DebugLinesSubsection.cpp:75

uint32_t calculateSerializedSize() const override

Definition DebugLinesSubsection.cpp:137

Represents a read-write view of a CodeView string table.

DebugSubsectionRef(DebugSubsectionKind Kind)

DebugSubsection(DebugSubsectionKind Kind)

const LineFragmentHeader * Header

LLVM_ABI Error operator()(BinaryStreamRef Stream, uint32_t &Len, LineColumnEntry &Item)

Definition DebugLinesSubsection.cpp:23

This is an optimization pass for GlobalISel generic memory operations.

Error make_error(ArgTs &&... Args)

Make a Error instance representing failure using the given error info type.

support::ulittle16_t StartColumn

support::ulittle16_t EndColumn

FixedStreamArray< ColumnNumberEntry > Columns

support::ulittle32_t NameIndex

FixedStreamArray< LineNumberEntry > LineNumbers

support::ulittle32_t Offset

support::ulittle32_t Flags