9#ifndef LLVM_SUPPORT_WITHCOLOR_H
10#define LLVM_SUPPORT_WITHCOLOR_H
74 : OS(OS), Mode(Mode) {
101 bool DisableColors =
false);
104 bool DisableColors =
false);
107 bool DisableColors =
false);
110 bool DisableColors =
false);
#define LLVM_CTOR_NODISCARD
static cl::opt< RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Development, "development", "for training")))
Functions, function parameters, and return types can have attributes to indicate how they should be t...
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
An RAII object that temporarily switches an output stream to a specific color.
LLVM_ABI 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 LLVM_ABI void defaultWarningHandler(Error Warning)
Implement default handling for Warning.
LLVM_CTOR_NODISCARD LLVM_ABI WithColor(raw_ostream &OS, HighlightColor S, ColorMode Mode=ColorMode::Auto)
To be used like this: WithColor(OS, HighlightColor::String) << "text";.
WithColor & operator<<(const T &O)
LLVM_ABI bool colorsEnabled()
Determine whether colors are displayed.
static LLVM_ABI raw_ostream & warning()
Convenience method for printing "warning: " to stderr.
LLVM_CTOR_NODISCARD WithColor(raw_ostream &OS, raw_ostream::Colors Color=raw_ostream::SAVEDCOLOR, bool Bold=false, bool BG=false, ColorMode Mode=ColorMode::Auto)
To be used like this: WithColor(OS, raw_ostream::BLACK) << "text";.
static LLVM_ABI raw_ostream & error()
Convenience method for printing "error: " to stderr.
bool(*)(const raw_ostream &OS) AutoDetectFunctionType
LLVM_ABI WithColor & resetColor()
Reset the colors to terminal defaults.
static LLVM_ABI void defaultErrorHandler(Error Err)
Implement default handling for Error.
static LLVM_ABI raw_ostream & note()
Convenience method for printing "note: " to stderr.
static LLVM_ABI AutoDetectFunctionType defaultAutoDetectFunction()
Retrieve the default color auto detection function.
static LLVM_ABI void setAutoDetectFunction(AutoDetectFunctionType NewAutoDetectFunction)
Change the global auto detection function.
WithColor & operator<<(T &O)
static LLVM_ABI raw_ostream & remark()
Convenience method for printing "remark: " to stderr.
This class implements an extremely fast bulk output stream that can only output to a stream.
static constexpr Colors SAVEDCOLOR
This namespace contains all of the command line option processing machinery.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI cl::OptionCategory & getColorCategory()
@ Auto
Determine whether to use color based on the command line argument and the raw_ostream.