LLVM: lib/BinaryFormat/COFF.cpp Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

12

13

16

17

18

19

22 "Illegal section name encoding for value");

23

24 static const char Alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

25 "abcdefghijklmnopqrstuvwxyz"

26 "0123456789+/";

27

28 Buffer[0] = '/';

29 Buffer[1] = '/';

30

31 char *Ptr = Buffer + 7;

32 for (unsigned i = 0; i < 6; ++i) {

33 unsigned Rem = Value % 64;

34 Value /= 64;

35 *(Ptr--) = Alphabet[Rem];

36 }

37}

38

41

45 std::memcpy(Out, Buffer.data(), Buffer.size());

46 return true;

47 }

48

50

52 return true;

53 }

54

55

56 return false;

57}

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

static void encodeBase64StringEntry(char *Buffer, uint64_t Value)

Definition COFF.cpp:20

@ MaxBase64Offset

Definition COFF.cpp:15

@ Max7DecimalOffset

Definition COFF.cpp:14

This file defines the SmallVector class.

pointer data()

Return a pointer to the vector's buffer, even if empty().

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

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

Twine concat(const Twine &Suffix) const

LLVM_ABI void toVector(SmallVectorImpl< char > &Out) const

Append the concatenated string into the given SmallString or SmallVector.

LLVM_ABI bool encodeSectionName(char *Out, uint64_t Offset)

Encode section name based on string table offset.

Definition COFF.cpp:39