class format_object_base {
protected:
const char *Fmt;
- ~format_object_base() {} // Disallow polymorphic deletion.
- format_object_base(const format_object_base&) = default;
+ ~format_object_base() = default; // Disallow polymorphic deletion.
+ format_object_base(const format_object_base &) = default;
virtual void home(); // Out of line virtual method.
/// Call snprintf() for this object, on the given buffer and size.
unsigned Width;
bool RightJustify;
friend class raw_ostream;
+
public:
FormattedString(StringRef S, unsigned W, bool R)
: Str(S), Width(W), RightJustify(R) { }
bool Upper;
bool HexPrefix;
friend class raw_ostream;
+
public:
FormattedNumber(uint64_t HV, int64_t DV, unsigned W, bool H, bool U,
bool Prefix)
return FormattedNumber(N, 0, Width, true, Upper, false);
}
-/// format_decimal - Output \p N as a right justified, fixed-width decimal. If
+/// format_decimal - Output \p N as a right justified, fixed-width decimal. If
/// number will not fit in width, full number is still printed. Examples:
/// OS << format_decimal(0, 5) => " 0"
/// OS << format_decimal(255, 5) => " 255"
return FormattedNumber(0, N, Width, false, false, false);
}
-
} // end namespace llvm
#endif