22#define DEBUG_TYPE "Object"
36 return std::string(Level * 2,
' ');
41 return (
options().getPrintFormatting() ||
options().getPrintOffset())
48 return std::string(8,
' ');
53 bool ShowZero)
const {
58 std::stringstream Stream;
61 Stream << std::setw(5) << LineNumber <<
"," << std::left << std::setw(2)
64 Stream << std::setw(5) << LineNumber <<
" ";
68 if (
options().getInternalNone())
84 Stream <<
"@" << LineNumber << (Spaces ?
" " :
"");
103 Parent->setIsMissing();
105 Parent->setIsMissingLink();
118 bool UseQuotes,
bool PrintRef)
const {
121 Object.setLevel(Parent->
getLevel() + 1);
122 Object.setLineNumber(0);
123 Object.printAttributes(
OS,
Full);
126 std::string TheLineNumber(Object.lineNumberAsString());
127 std::string TheIndentation(Object.indentAsString());
128 OS <<
format(
" %5s %s ", TheLineNumber.c_str(), TheIndentation.c_str());
144 if (
options().getCompareExecute() &&
145 (
options().getAttributeAdded() ||
options().getAttributeMissing()))
146 OS << (getIsAdded() ?
'+' : getIsMissing() ?
'-' :
' ');
147 if (
options().getAttributeOffset())
149 if (
options().getAttributeLevel()) {
150 std::stringstream Stream;
151 Stream.str(std::string());
152 Stream <<
"[" << std::setfill(
'0') << std::setw(3) <<
getLevel() <<
"]";
153 std::string TheLevel(Stream.str());
156 if (
options().getAttributeGlobal())
157 OS << (getIsGlobalReference() ?
'X' :
' ');
165 std::stringstream Stream;
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
virtual Error doPrint(bool Split, bool Match, bool Print, raw_ostream &OS, bool Full=true) const
std::string lineAsString(uint32_t LineNumber, LVHalf Discriminator, bool ShowZero) const
std::string indentAsString() const
virtual void print(raw_ostream &OS, bool Full=true) const
void setLevel(LVLevel Level)
void printAttributes(raw_ostream &OS, bool Full=true) const
virtual std::string lineNumberAsString(bool ShowZero=false) const
void setParent(LVScope *Scope)
virtual void printFileIndex(raw_ostream &OS, bool Full=true) const
void markBranchAsMissing()
virtual std::string noLineAsString(bool ShowZero) const
LVOffset getOffset() const
LVElement * getParent() const
std::string lineNumberAsStringStripped(bool ShowZero=false) const
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.
std::string hexSquareString(uint64_t Value)
std::string formattedName(StringRef Name)
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.