LLVM 22.0.0git
|
Classes | |
class | RAIINewLineStream |
A raw_ostream that prints a newline on destruction, useful for LDBG() More... | |
class | raw_ldbg_ostream |
A raw_ostream that tracks \n and print the prefix after each newline. More... |
Functions | |
constexpr ::llvm::StringRef | strip_quotes (const char *Str) |
Return the stringified macro as a StringRef. | |
static bool | ldbgIsCurrentDebugType (StringRef Type, int Level) |
Helper to call isCurrentDebugType with a StringRef. | |
static bool | ldbgIsCurrentDebugType (int Level, StringRef Type) |
static constexpr const char * | getShortFileName (const char *path) |
Remove the path prefix from the file name. | |
static std::string | computePrefix (StringRef DebugType, const char *File, int Line, int Level) |
Compute the prefix for the debug log in the form of: "[DebugType] File:Line " Where the File is the file name without the path prefix. | |
static std::string | computePrefix (int Level, const char *File, int Line, StringRef DebugType) |
Overload allowing to swap the order of the DebugType and Level arguments. |
|
static |
Overload allowing to swap the order of the DebugType and Level arguments.
Definition at line 328 of file DebugLog.h.
|
static |
Compute the prefix for the debug log in the form of: "[DebugType] File:Line " Where the File is the file name without the path prefix.
Definition at line 317 of file DebugLog.h.
Remove the path prefix from the file name.
Definition at line 304 of file DebugLog.h.
Definition at line 227 of file DebugLog.h.
Helper to call isCurrentDebugType with a StringRef.
Definition at line 224 of file DebugLog.h.
::llvm::StringRef llvm::impl::strip_quotes | ( | const char * | Str | ) |
Return the stringified macro as a StringRef.
Also, strip out potential surrounding quotes: this comes from an artifact of the macro stringification, if DEBUG_TYPE is undefined we get the string "DEBUG_TYPE", however if it is defined we get the string with the quotes. For example if DEBUG_TYPE is "foo", we get "\"foo\"" but we want to return "foo" here.
Definition at line 192 of file DebugLog.h.
References llvm::StringRef::size().