Go to the documentation of this file.
24 struct CreateUseColor {
28 cl::desc(
"Use colors in output (default=autodetect)"),
102 bool DisableColors) {
112 bool DisableColors) {
122 bool DisableColors) {
138 return AutoDetectFunction(OS);
176 AutoDetectFunction = NewAutoDetectFunction;
static ManagedStatic< cl::opt< cl::boolOrDefault >, CreateUseColor > UseColor
This is an optimization pass for GlobalISel generic memory operations.
cl::OptionCategory & getColorCategory()
WithColor(raw_ostream &OS, HighlightColor S, ColorMode Mode=ColorMode::Auto)
To be used like this: WithColor(OS, HighlightColor::String) << "text";.
bool colorsEnabled()
Determine whether colors are displayed.
static constexpr Colors GREEN
static void defaultErrorHandler(Error Err)
Implement default handling for Error.
An RAII object that temporarily switches an output stream to a specific color.
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
static constexpr Colors RED
static void defaultWarningHandler(Error Warning)
Implement default handling for Warning.
static raw_ostream & remark()
Convenience method for printing "remark: " to stderr.
static raw_ostream & error()
Convenience method for printing "error: " to stderr.
static constexpr Colors MAGENTA
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.
bool(*)(const raw_ostream &OS) AutoDetectFunctionType
void initWithColorOptions()
ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on...
@ Auto
Determine whether to use color based on the command line argument and the raw_ostream.
This class implements an extremely fast bulk output stream that can only output to a stream.
static void setAutoDetectFunction(AutoDetectFunctionType NewAutoDetectFunction)
Change the global auto detection function.
Analysis containing CSE Info
Base class for error info classes.
static raw_ostream & warning()
Convenience method for printing "warning: " to stderr.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
S is passed via registers r2 But gcc stores them to the and then reload them to and r3 before issuing the call(r0 contains the address of the format string)
initializer< Ty > init(const Ty &Val)
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.
WithColor & resetColor()
Reset the colors to terminal defaults.
static constexpr Colors CYAN
static bool DefaultAutoDetectFunction(const raw_ostream &OS)
StringRef - Represent a constant reference to a string, i.e.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
virtual bool has_colors() const
This function determines if this stream is displayed and supports colors.
Lightweight error class with error context and mandatory checking.
static constexpr Colors BLACK
virtual raw_ostream & resetColor()
Resets the colors to terminal defaults.
static constexpr Colors BLUE
static raw_ostream & note()
Convenience method for printing "note: " to stderr.
static constexpr Colors YELLOW
void handleAllErrors(Error E, HandlerTs &&... Handlers)
Behaves the same as handleErrors, except that by contract all errors must be handled by the given han...
static AutoDetectFunctionType defaultAutoDetectFunction()
Retrieve the default color auto detection function.