LLVM: include/llvm/MC/StringTableBuilder.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_MC_STRINGTABLEBUILDER_H

10#define LLVM_MC_STRINGTABLEBUILDER_H

11

17#include

18#include

19

20namespace llvm {

21

23

24

26public:

39

40private:

41

44 size_t Size = 0;

45 Kind K;

47 bool Finalized = false;

48

49 void finalizeStringTable(bool Optimize);

50 void initSize();

51

52public:

55

56

57

58

59

60

61

66

67

68

70

71

72

74

75

76

81

82

83

84

87

88 bool empty() const { return StringIndexMap.empty(); }

89 size_t getSize() const { return Size; }

91

94

96};

97

98}

99

100#endif

This file defines CachedHashString and CachedHashStringRef.

This file defines the DenseMap class.

A container which contains a StringRef plus a precomputed hash.

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

LLVM_ABI void finalizeInOrder()

Finalize the string table without reording it.

LLVM_ABI size_t getOffset(CachedHashStringRef S) const

Get the offest of a string in the string table.

bool empty() const

Definition StringTableBuilder.h:88

Kind

Definition StringTableBuilder.h:27

@ DXContainer

Definition StringTableBuilder.h:37

@ MachO64Linked

Definition StringTableBuilder.h:33

@ WinCOFF

Definition StringTableBuilder.h:29

@ XCOFF

Definition StringTableBuilder.h:36

@ RAW

Definition StringTableBuilder.h:34

@ MachOLinked

Definition StringTableBuilder.h:32

@ MachO64

Definition StringTableBuilder.h:31

@ MachO

Definition StringTableBuilder.h:30

@ ELF

Definition StringTableBuilder.h:28

@ DWARF

Definition StringTableBuilder.h:35

LLVM_ABI ~StringTableBuilder()

bool contains(StringRef S) const

Check if a string is contained in the string table.

Definition StringTableBuilder.h:85

LLVM_ABI size_t add(CachedHashStringRef S, uint8_t Priority=0)

Add a string to the builder.

size_t add(StringRef S, uint8_t Priority=0)

Definition StringTableBuilder.h:63

bool contains(CachedHashStringRef S) const

Definition StringTableBuilder.h:86

size_t getOffset(StringRef S) const

Definition StringTableBuilder.h:78

bool isFinalized() const

Definition StringTableBuilder.h:95

LLVM_ABI void write(raw_ostream &OS) const

LLVM_ABI void finalize()

Analyze the strings and build the final table.

LLVM_ABI StringTableBuilder(Kind K, Align Alignment=Align(1))

size_t getSize() const

Definition StringTableBuilder.h:89

This class implements an extremely fast bulk output stream that can only output to a stream.

This is an optimization pass for GlobalISel generic memory operations.

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