LLVM: lib/DebugInfo/GSYM/FileWriter.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

12#include

13

14using namespace llvm;

15using namespace gsym;

16

18

23 OS.write(reinterpret_cast<const char *>(Bytes), Length);

24}

25

30 OS.write(reinterpret_cast<const char *>(Bytes), Length);

31}

32

34 OS.write(reinterpret_cast<const char *>(&U), sizeof(U));

35}

36

39 OS.write(reinterpret_cast<const char *>(&Swapped), sizeof(Swapped));

40}

41

44 OS.write(reinterpret_cast<const char *>(&Swapped), sizeof(Swapped));

45}

46

49 OS.write(reinterpret_cast<const char *>(&Swapped), sizeof(Swapped));

50}

51

54 OS.pwrite(reinterpret_cast<const char *>(&Swapped), sizeof(Swapped),

56}

57

59 OS.write(reinterpret_cast<const char *>(Data.data()), Data.size());

60}

61

63 OS << Str << '\0';

64}

65

69

71 off_t Offset = OS.tell();

73 if (AlignedOffset == Offset)

74 return;

75 off_t PadCount = AlignedOffset - Offset;

76 OS.write_zeros(PadCount);

77}

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

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

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

LLVM_ABI uint64_t tell()

Return the current offset within the file.

Definition FileWriter.cpp:66

LLVM_ABI void writeULEB(uint64_t Value)

Write the value into the stream encoded using unsigned LEB128 at the current file position.

Definition FileWriter.cpp:26

LLVM_ABI void writeU16(uint16_t Value)

Write a single uint16_t value into the stream at the current file position.

Definition FileWriter.cpp:37

LLVM_ABI void fixup32(uint32_t Value, uint64_t Offset)

Fixup a uint32_t value at the specified offset in the stream.

Definition FileWriter.cpp:52

LLVM_ABI void writeSLEB(int64_t Value)

Write the value into the stream encoded using signed LEB128 at the current file position.

Definition FileWriter.cpp:19

LLVM_ABI void writeU8(uint8_t Value)

Write a single uint8_t value into the stream at the current file position.

Definition FileWriter.cpp:33

LLVM_ABI void alignTo(size_t Align)

Pad with zeroes at the current file position until the current file position matches the specified al...

Definition FileWriter.cpp:70

LLVM_ABI void writeU32(uint32_t Value)

Write a single uint32_t value into the stream at the current file position.

Definition FileWriter.cpp:42

LLVM_ABI void writeData(llvm::ArrayRef< uint8_t > Data)

Write an array of uint8_t values into the stream at the current file position.

Definition FileWriter.cpp:58

LLVM_ABI void writeNullTerminated(llvm::StringRef Str)

Write a NULL terminated C string into the stream at the current file position.

Definition FileWriter.cpp:62

LLVM_ABI ~FileWriter()

Definition FileWriter.cpp:17

LLVM_ABI void writeU64(uint64_t Value)

Write a single uint64_t value into the stream at the current file position.

Definition FileWriter.cpp:47

value_type byte_swap(value_type value, endianness endian)

This is an optimization pass for GlobalISel generic memory operations.

FunctionAddr VTableAddr uintptr_t uintptr_t Data

unsigned encodeSLEB128(int64_t Value, raw_ostream &OS, unsigned PadTo=0)

Utility function to encode a SLEB128 value to an output stream.

unsigned encodeULEB128(uint64_t Value, raw_ostream &OS, unsigned PadTo=0)

Utility function to encode a ULEB128 value to an output stream.

This struct is a compact representation of a valid (non-zero power of two) alignment.