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

27

31

32};

33

37

40 return EC;

41

45 return EC;

46

49}

53 return EC;

54

56}

57

61}

62

66

71 if (!Bytes.empty()) {

75 }

76

77 Entry.FileNameOffset = Strings.insert(FileName);

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) {

97 Header.ChecksumKind = uint8_t(FC.Kind);

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

99 Header.FileNameOffset = FC.FileNameOffset;

101 return EC;

103 return EC;

105 return EC;

106 }

108}

109

114 return Iter->second;

115}

assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

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

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.

Error padToAlignment(uint32_t Align)

LLVM_ATTRIBUTE_RETURNS_NONNULL void * Allocate(size_t Size, Align Alignment)

Allocate space at the specified alignment.

iterator find(const_arg_type_t< KeyT > Val)

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.

Error initialize(BinaryStreamReader Reader)

Error commit(BinaryStreamWriter &Writer) const override

uint32_t mapChecksumOffset(StringRef FileName) const

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

DebugChecksumsSubsection(DebugStringTableSubsection &Strings)

uint32_t calculateSerializedSize() const override

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

uint32_t getIdForString(StringRef S) const

uint32_t insert(StringRef S)

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< uint8_t > Checksum