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 LLVM_ATTRIBUTE_UNUSED bool | ldbgIsCurrentDebugType (StringRef Type, int Level) |
Helper to call isCurrentDebugType with a StringRef. | |
static LLVM_ATTRIBUTE_UNUSED bool | ldbgIsCurrentDebugType (int Level, StringRef Type) |
static LLVM_ATTRIBUTE_UNUSED constexpr const char * | getShortFileName (const char *path) |
Remove the path prefix from the file name. | |
static LLVM_ATTRIBUTE_UNUSED 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 LLVM_ATTRIBUTE_UNUSED 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 330 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 319 of file DebugLog.h.
|
staticconstexpr |
Remove the path prefix from the file name.
Definition at line 306 of file DebugLog.h.
|
static |
Definition at line 228 of file DebugLog.h.
|
static |
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().