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

1

2

3

4

5

6

7

8

18#include

19#include

20#include

21

22using namespace llvm;

24

33

37

40 return EC;

41

45 return EC;

46

49}

57

62

66

71 if (!Bytes.empty()) {

75 }

76

78 Entry.Kind = Kind;

79 Checksums.push_back(Entry);

80

81

82

83 OffsetMap[Entry.FileNameOffset] = SerializedSize;

84 assert(SerializedSize % 4 == 0);

85

87 SerializedSize += Len;

88}

89

91 return SerializedSize;

92}

93

95 for (const auto &FC : Checksums) {

98 Header.ChecksumSize = FC.Checksum.size();

99 Header.FileNameOffset = FC.FileNameOffset;

101 return EC;

103 return EC;

105 return EC;

106 }

108}

109

112 auto Iter = OffsetMap.find(Offset);

113 assert(Iter != OffsetMap.end());

114 return Iter->second;

115}

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

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

size_t size() const

size - Get the array size.

bool empty() const

empty - Check if the array is empty.

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...

LLVM_ABI Error readBytes(ArrayRef< uint8_t > &Buffer, uint32_t Size)

Read Size bytes from the underlying stream at the current offset and and set Buffer to the resulting ...

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.

LLVM_ABI Error padToAlignment(uint32_t Align)

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 Error initialize(BinaryStreamReader Reader)

Definition DebugChecksumsSubsection.cpp:51

Error commit(BinaryStreamWriter &Writer) const override

Definition DebugChecksumsSubsection.cpp:94

uint32_t mapChecksumOffset(StringRef FileName) const

Definition DebugChecksumsSubsection.cpp:110

void addChecksum(StringRef FileName, FileChecksumKind Kind, ArrayRef< uint8_t > Bytes)

Definition DebugChecksumsSubsection.cpp:67

DebugChecksumsSubsection(DebugStringTableSubsection &Strings)

Definition DebugChecksumsSubsection.cpp:63

uint32_t calculateSerializedSize() const override

Definition DebugChecksumsSubsection.cpp:90

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

DebugSubsection(DebugSubsectionKind Kind)

detail::packed_endian_specific_integral< uint32_t, llvm::endianness::little, unaligned > ulittle32_t

This is an optimization pass for GlobalISel generic memory operations.

uint64_t alignTo(uint64_t Size, Align A)

Returns a multiple of A needed to store Size bytes.

ArrayRef(const T &OneElt) -> ArrayRef< T >

ArrayRef< uint8_t > Checksum