LLVM: include/llvm/DebugInfo/Symbolize/Markup.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16#ifndef LLVM_DEBUGINFO_SYMBOLIZE_MARKUP_H

17#define LLVM_DEBUGINFO_SYMBOLIZE_MARKUP_H

18

24

25namespace llvm {

27

28

29

30

31

32

33

35

37

38

40

41

42

44

49};

50

51

53public:

55

56

57

58

59

60

61

62

63

64

65

66

67

69

70

71

72

73

74

76

77

78

79

80

81

82

84

86 return SGRSyntax.match(Node.Text);

87 }

88

89private:

90 std::optional parseElement(StringRef Line);

91 void parseTextOutsideMarkup(StringRef Text);

92 std::optional parseMultiLineBegin(StringRef Line);

93 std::optional parseMultiLineEnd(StringRef Line);

94

95

97

98

99

100 std::string FinishedMultiline;

101

102

103

104 std::string InProgressMultiline;

105

106

108

109

111

112

113 size_t NextIdx;

114

115

116 const Regex SGRSyntax;

117};

118

119}

120}

121

122#endif

This file defines the SmallVector class.

StringSet - A set-like wrapper for the StringMap.

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

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

StringSet - A wrapper for StringMap that provides set-like functionality.

LLVM_ABI std::optional< MarkupNode > nextNode()

Returns the next node in the input sequence.

LLVM_ABI void flush()

Inform the parser of that the input stream has ended.

bool isSGR(const MarkupNode &Node) const

Definition Markup.h:85

LLVM_ABI MarkupParser(StringSet<> MultilineTags={})

LLVM_ABI void parseLine(StringRef Line)

Parses an individual Line of input.

This is an optimization pass for GlobalISel generic memory operations.

A node of symbolizer markup.

Definition Markup.h:34

StringRef Text

The full text of this node in the input.

Definition Markup.h:36

bool operator!=(const MarkupNode &Other) const

Definition Markup.h:48

SmallVector< StringRef > Fields

If this represents an element with fields, a list of the field contents.

Definition Markup.h:43

StringRef Tag

If this represents an element, the tag. Otherwise, empty.

Definition Markup.h:39

bool operator==(const MarkupNode &Other) const

Definition Markup.h:45