LLVM: include/llvm/TableGen/StringToOffsetTable.h Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9#ifndef LLVM_TABLEGEN_STRINGTOOFFSETTABLE_H

10#define LLVM_TABLEGEN_STRINGTOOFFSETTABLE_H

11

15#include

16

17namespace llvm {

18

19

20

21

22

25 std::string AggregateString;

26

27

28

30 const bool AppendZero;

31 const bool UsePrefixForStorageMember;

32

33public:

35 bool UsePrefixForStorageMember = true)

36 : ClassPrefix(ClassPrefix), AppendZero(AppendZero),

37 UsePrefixForStorageMember(UsePrefixForStorageMember) {

38

39

41 }

42

43 bool empty() const { return StringOffset.empty(); }

44 size_t size() const { return AggregateString.size(); }

45

47

48

49

51 auto II = StringOffset.find(Str);

52 if (II == StringOffset.end())

53 return std::nullopt;

54 return II->second;

55 }

56

57

58

59

60

61

62

63

64

65

66

67

69

70

72};

73

74}

75

76#endif

This file defines the StringMap class.

uint64_t IntrinsicInst * II

This file defines the SmallString class.

StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...

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

size_t size() const

Definition StringToOffsetTable.h:44

bool empty() const

Definition StringToOffsetTable.h:43

unsigned GetOrAddStringOffset(StringRef Str)

void EmitStringTableDef(raw_ostream &OS, const Twine &Name) const

void EmitString(raw_ostream &O) const

StringToOffsetTable(bool AppendZero=true, StringRef ClassPrefix="", bool UsePrefixForStorageMember=true)

Definition StringToOffsetTable.h:34

std::optional< unsigned > GetStringOffset(StringRef Str) const

Definition StringToOffsetTable.h:50

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

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.