LLVM 22.0.0git
Classes | Functions
llvm::impl Namespace Reference

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

static LLVM_ATTRIBUTE_UNUSED constexpr const chargetShortFileName (const char *path)
 Remove the path prefix from the file name.
 
static LLVM_ATTRIBUTE_UNUSED std::string computePrefix (const char *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, const char *DebugType)
 Overload allowing to swap the order of the DebugType and Level arguments.
 

Function Documentation

◆ computePrefix() [1/2]

static LLVM_ATTRIBUTE_UNUSED std::string llvm::impl::computePrefix ( const char DebugType,
const char File,
int  Line,
int  Level 
)
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 176 of file DebugLog.h.

References llvm::raw_string_ostream::str().

Referenced by computePrefix().

◆ computePrefix() [2/2]

static LLVM_ATTRIBUTE_UNUSED std::string llvm::impl::computePrefix ( int  Level,
const char File,
int  Line,
const char DebugType 
)
static

Overload allowing to swap the order of the DebugType and Level arguments.

Definition at line 186 of file DebugLog.h.

References computePrefix().

◆ getShortFileName()

static LLVM_ATTRIBUTE_UNUSED constexpr const char * llvm::impl::getShortFileName ( const char path)
staticconstexpr

Remove the path prefix from the file name.

Definition at line 163 of file DebugLog.h.