24 static const char hex_rep[] =
"0123456789abcdef";
26 OS << hex_rep[(i & 0xF0) >> 4];
27 OS << hex_rep[i & 0xF];
47 (*CommentStream) << Annot;
50 if (Annot.back() !=
'\n')
76 uint64_t digit = (Value >> 60) & 0xf;
78 return (digit >= 0xa);
85 return format(
"%" PRId64, Value);
92 return format(
"-0x%" PRIx64, -Value);
94 return format(
"0x%" PRIx64, Value);
98 return format(
"-0%" PRIx64
"h", -Value);
100 return format(
"-%" PRIx64
"h", -Value);
103 return format(
"0%" PRIx64
"h", Value);
105 return format(
"%" PRIx64
"h", Value);
114 return format(
"0x%" PRIx64, Value);
117 return format(
"0%" PRIx64
"h", Value);
119 return format(
"%" PRIx64
"h", Value);
HexStyle::Style PrintHexStyle
Which style to use for printing hexadecimal values.
static bool needsLeadingZero(uint64_t Value)
This class represents lattice values for constants.
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
virtual void printRegName(raw_ostream &OS, unsigned RegNo) const
Print the assembler register name.
format_object< int64_t > formatDec(int64_t Value) const
Utility functions to print decimal/hexadecimal values.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
StringRef markup(StringRef s) const
Utility functions to make adding mark ups simpler.
StringRef getCommentString() const
StringRef getName(unsigned Opcode) const
Returns the name for the instructions with the given opcode.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
raw_ostream * CommentStream
A stream that comments can be emitted to if desired.
bool getUseMarkup() const
StringRef getOpcodeName(unsigned Opcode) const
Return the name of the specified opcode enum (e.g.
format_object< int64_t > formatHex(int64_t Value) const
void dumpBytes(ArrayRef< uint8_t > Bytes, raw_ostream &OS)
Convert `Bytes' to a hex string and output to `OS'.
LLVM Value Representation.
void printAnnotation(raw_ostream &OS, StringRef Annot)
Utility function for printing annotations.
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.