LLVM: lib/DebugInfo/LogicalView/Core/LVObject.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

17#include

18

19using namespace llvm;

21

22#define DEBUG_TYPE "Object"

23

25

31

32

34 return std::string(Level * 2, ' ');

35}

36

37

39 return (options().getPrintFormatting() || options().getPrintOffset())

41 : "";

42}

43

44

46 return std::string(8, ' ');

47}

48

49

51 bool ShowZero) const {

52

53

54

55

56 std::stringstream Stream;

57 if (LineNumber) {

59 Stream << std::setw(5) << LineNumber << "," << std::left << std::setw(2)

61 else

62 Stream << std::setw(5) << LineNumber << " ";

63 } else

65

66 if (options().getInternalNone())

68

69 return Stream.str();

70}

71

72

76

78 bool Spaces) const {

81 if (LineNumber)

82 Stream << "@" << LineNumber << (Spaces ? " " : "");

83

85}

86

88 Parent.Scope = Scope;

90}

92 Parent.Symbol = Symbol;

94}

95

97

98

99

100 LVObject *Parent = this;

101 Parent->setIsMissing();

102 while (Parent) {

103 Parent->setIsMissingLink();

104 Parent = Parent->getParent();

105 }

106}

107

109 bool Full) const {

112}

113

116 bool UseQuotes, bool PrintRef) const {

117

118 LVObject Object(*Parent);

119 Object.setLevel(Parent->getLevel() + 1);

120 Object.setLineNumber(0);

121 Object.printAttributes(OS, Full);

122

123

124 std::string TheLineNumber(Object.lineNumberAsString());

125 std::string TheIndentation(Object.indentAsString());

126 OS << format(" %5s %s ", TheLineNumber.c_str(), TheIndentation.c_str());

127

131 if (UseQuotes)

133 else

134 OS << Value << "\n";

135}

136

138 if (options().getInternalID())

140 if (options().getCompareExecute() &&

141 (options().getAttributeAdded() || options().getAttributeMissing()))

142 OS << (getIsAdded() ? '+' : getIsMissing() ? '-' : ' ');

143 if (options().getAttributeOffset())

145 if (options().getAttributeLevel()) {

146 std::stringstream Stream;

147 Stream.str(std::string());

148 Stream << "[" << std::setfill('0') << std::setw(3) << getLevel() << "]";

149 std::string TheLevel(Stream.str());

150 OS << TheLevel;

151 }

152 if (options().getAttributeGlobal())

153 OS << (getIsGlobalReference() ? 'X' : ' ');

154}

155

159

160

161 std::stringstream Stream;

164 OS << Stream.str();

165}

static cl::opt< bool > PrintRef("print-ref", cl::ReallyHidden)

Lightweight error class with error context and mandatory checking.

static ErrorSuccess success()

Create a success value.

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

LLVM Value Representation.

std::string referenceAsString(uint32_t LineNumber, bool Spaces) const

Definition LVObject.cpp:77

virtual Error doPrint(bool Split, bool Match, bool Print, raw_ostream &OS, bool Full=true) const

Definition LVObject.cpp:108

std::string lineAsString(uint32_t LineNumber, LVHalf Discriminator, bool ShowZero) const

Definition LVObject.cpp:50

std::string indentAsString() const

Definition LVObject.cpp:38

virtual void print(raw_ostream &OS, bool Full=true) const

Definition LVObject.cpp:156

void setLevel(LVLevel Level)

void printAttributes(raw_ostream &OS, bool Full=true) const

Definition LVObject.cpp:137

virtual std::string lineNumberAsString(bool ShowZero=false) const

void setParent(LVScope *Scope)

Definition LVObject.cpp:87

virtual void printFileIndex(raw_ostream &OS, bool Full=true) const

void markBranchAsMissing()

Definition LVObject.cpp:96

virtual std::string noLineAsString(bool ShowZero) const

Definition LVObject.cpp:45

LVOffset getOffset() const

std::string lineNumberAsStringStripped(bool ShowZero=false) const

Definition LVObject.cpp:73

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

A raw_ostream that writes to an std::string.

LLVM_ABI StringRef typeUnknown()

Definition LVObject.cpp:29

LLVM_ABI StringRef emptyString()

Definition LVObject.cpp:30

LLVM_ABI StringRef typeNone()

Definition LVObject.cpp:26

std::string hexSquareString(uint64_t Value)

std::string formattedName(StringRef Name)

LLVM_ABI StringRef typeInt()

Definition LVObject.cpp:28

LLVM_ABI StringRef typeVoid()

Definition LVObject.cpp:27

This is an optimization pass for GlobalISel generic memory operations.

format_object< Ts... > format(const char *Fmt, const Ts &... Vals)

These are helper functions used to produce formatted output.