20 static const char hex_rep[] =
"0123456789abcdef";
22 OS << hex_rep[(i & 0xF0) >> 4];
23 OS << hex_rep[i & 0xF];
44 (*CommentStream) << Annot;
47 if (Annot.back() !=
'\n')
73 uint64_t digit = (Value >> 60) & 0xf;
75 return (digit >= 0xa);
82 return format(
"%" PRId64, Value);
89 return format(
"-0x%" PRIx64, -Value);
91 return format(
"0x%" PRIx64, Value);
95 return format(
"-0%" PRIx64
"h", -Value);
97 return format(
"-%" PRIx64
"h", -Value);
100 return format(
"0%" PRIx64
"h", Value);
102 return format(
"%" PRIx64
"h", Value);
111 return format(
"0x%" PRIx64, Value);
114 return format(
"0%" PRIx64
"h", Value);
116 return format(
"%" PRIx64
"h", Value);
HexStyle::Style PrintHexStyle
Which style to use for printing hexadecimal values.
static bool needsLeadingZero(uint64_t Value)
format_object< int64_t > formatHex(int64_t Value) const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
format_object< int64_t > formatDec(int64_t Value) const
Utility functions to print decimal/hexadecimal values.
virtual void printRegName(raw_ostream &OS, unsigned RegNo) const
Print the assembler register name.
format_object< Ts...> format(const char *Fmt, const Ts &...Vals)
These are helper functions used to produce formatted output.
StringRef markup(StringRef s) const
Utility functions to make adding mark ups simpler.
const char * getName(unsigned Opcode) const
Returns the name for the instructions with the given opcode.
bool getUseMarkup() const
StringRef getOpcodeName(unsigned Opcode) const
Return the name of the specified opcode enum (e.g.
raw_ostream * CommentStream
A stream that comments can be emitted to if desired.
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.
const char * getCommentString() const
bool empty() const
empty - Check if the string is empty.