19 cl::desc(
"Use colors in output (default=autodetect)"),
23 : OS(OS), DisableColors(DisableColors) {
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
This class represents lattice values for constants.
An RAII object that temporarily switches an output stream to a specific color.
static raw_ostream & error()
Convenience method for printing "error: " to stderr.
virtual raw_ostream & changeColor(enum Colors Color, bool Bold=false, bool BG=false)
Changes the foreground color of text that will be output from this point forward. ...
WithColor(raw_ostream &OS, HighlightColor S, bool DisableColors=false)
To be used like this: WithColor(OS, HighlightColor::String) << "text";.
static raw_ostream & warning()
Convenience method for printing "warning: " to stderr.
WithColor & changeColor(raw_ostream::Colors Color, bool Bold=false, bool BG=false)
Change the color of text that will be output from this point forward.
static raw_ostream & note()
Convenience method for printing "note: " to stderr.
WithColor & resetColor()
Reset the colors to terminal defaults.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
initializer< Ty > init(const Ty &Val)
bool colorsEnabled()
Determine whether colors are displayed.
virtual bool has_colors() const
This function determines if this stream is displayed and supports colors.
Color
A "color", which is either even or odd.
static raw_ostream & remark()
Convenience method for printing "remark: " to stderr.
static cl::opt< cl::boolOrDefault > UseColor("color", cl::cat(ColorCategory), cl::desc("Use colors in output (default=autodetect)"), cl::init(cl::BOU_UNSET))
virtual raw_ostream & resetColor()
Resets the colors to terminal defaults.
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.
cl::OptionCategory ColorCategory