|
LLVM
7.0.0
|
An RAII object that temporarily switches an output stream to a specific color. More...
#include "llvm/Support/WithColor.h"
Public Member Functions | |
| WithColor (raw_ostream &OS, HighlightColor S) | |
| To be used like this: WithColor(OS, HighlightColor::String) << "text";. More... | |
| ~WithColor () | |
| raw_ostream & | get () |
| operator raw_ostream & () | |
Static Public Member Functions | |
| static raw_ostream & | error () |
| Convenience method for printing "error: " to stderr. More... | |
| static raw_ostream & | warning () |
| Convenience method for printing "warning: " to stderr. More... | |
| static raw_ostream & | note () |
| Convenience method for printing "note: " to stderr. More... | |
| static raw_ostream & | error (raw_ostream &OS, StringRef Prefix="") |
| Convenience method for printing "error: " to the given stream. More... | |
| static raw_ostream & | warning (raw_ostream &OS, StringRef Prefix="") |
| Convenience method for printing "warning: " to the given stream. More... | |
| static raw_ostream & | note (raw_ostream &OS, StringRef Prefix="") |
| Convenience method for printing "note: " to the given stream. More... | |
An RAII object that temporarily switches an output stream to a specific color.
Definition at line 37 of file WithColor.h.
| WithColor::WithColor | ( | raw_ostream & | OS, |
| HighlightColor | S | ||
| ) |
To be used like this: WithColor(OS, HighlightColor::String) << "text";.
Definition at line 28 of file WithColor.cpp.
References llvm::Address, llvm::Attribute, llvm::raw_ostream::BLACK, llvm::raw_ostream::BLUE, llvm::raw_ostream::changeColor(), llvm::raw_ostream::CYAN, llvm::Enumerator, llvm::Error, llvm::raw_ostream::GREEN, llvm::Macro, llvm::raw_ostream::MAGENTA, llvm::Note, llvm::raw_ostream::RED, llvm::String, llvm::Tag, llvm::Warning, and llvm::raw_ostream::YELLOW.
| WithColor::~WithColor | ( | ) |
Definition at line 87 of file WithColor.cpp.
References llvm::raw_ostream::resetColor().
|
static |
Convenience method for printing "error: " to stderr.
Definition at line 63 of file WithColor.cpp.
References llvm::errs().
Referenced by llvm::DWARFUnit::collectAddressRanges(), llvm::DWARFContext::defaultErrorHandler(), llvm::DWARFContext::dump(), dumpAttribute(), llvm::DWARFUnit::getCompilationDir(), llvm::DWARFVerifier::handleAccelTables(), llvm::DWARFDebugLoc::parse(), llvm::DWARFDebugLoc::parseOneLocationList(), llvm::DWARFDebugLocDWO::parseOneLocationList(), and llvm::PrintError().
|
static |
Convenience method for printing "error: " to the given stream.
Definition at line 69 of file WithColor.cpp.
References llvm::StringRef::empty(), llvm::Error, and WithColor().
|
inline |
Definition at line 47 of file WithColor.h.
Referenced by llvm::DWARFDebugMacro::dump(), llvm::DWARFFormValue::dump(), and llvm::DWARFDie::dump().
|
static |
Convenience method for printing "note: " to stderr.
Definition at line 67 of file WithColor.cpp.
References llvm::errs().
Referenced by llvm::DWARFVerifier::handleAccelTables().
|
static |
Convenience method for printing "note: " to the given stream.
Definition at line 81 of file WithColor.cpp.
References llvm::StringRef::empty(), llvm::Note, and WithColor().
|
inline |
Definition at line 48 of file WithColor.h.
References error, and llvm::cl::Prefix.
|
static |
Convenience method for printing "warning: " to stderr.
Definition at line 65 of file WithColor.cpp.
References llvm::errs().
Referenced by dumpAddrSection(), llvm::DWARFUnit::getCompilationDir(), llvm::DWARFVerifier::handleAccelTables(), and llvm::PrintWarning().
|
static |
Convenience method for printing "warning: " to the given stream.
Definition at line 75 of file WithColor.cpp.
References llvm::StringRef::empty(), llvm::Warning, and WithColor().
1.8.13