Anonymous View
LLVM 23.0.0git
Debug.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Functions

static std::pair< std::string, std::optional< int > > parseDebugType (StringRef DbgType)
 Parse a debug type string into a pair of the debug type and the debug level.
LLVM_ABI bool llvm::isCurrentDebugType (const char *Type, int Level=0)
 isCurrentDebugType - Return true if the specified string is the debug type specified on the command line, or if none was specified on the command line with the -debug-only=X option.
LLVM_ABI void llvm::setCurrentDebugTypes (const char **Types, unsigned Count)
 setCurrentDebugTypes - Set the current debug type, as if the -debug-only=X,Y,Z option were specified.
LLVM_ABI void llvm::setCurrentDebugType (const char *Type)
 setCurrentDebugType - Set the current debug type, as if the -debug-only=X option were specified.
static void printDebugLogImpl ()
static void debug_user_sig_handler (void *Cookie)

Variables

static ManagedStatic< std::vector< std::pair< std::string, std::optional< int > > > > llvm::CurrentDebugType
 The current debug type and an optional debug level.
static ManagedStatic< cl::opt< bool, true >, CreateDebug > Debug
static ManagedStatic< cl::opt< unsigned >, CreateDebugBufferSize > DebugBufferSize
static DebugOnlyOpt DebugOnlyOptLoc
static ManagedStatic< cl::opt< DebugOnlyOpt, true, cl::parser< std::string > >, CreateDebugOnly > DebugOnly

Function Documentation

◆ debug_user_sig_handler()

void debug_user_sig_handler ( void * Cookie)
static

Definition at line 206 of file Debug.cpp.

References printDebugLogImpl().

Referenced by llvm::dbgs().

◆ parseDebugType()

std::pair< std::string, std::optional< int > > parseDebugType ( StringRef DbgType)
static

Parse a debug type string into a pair of the debug type and the debug level.

The expected format is "type[:level]", where the level is an optional integer.

Definition at line 47 of file Debug.cpp.

References llvm::StringRef::empty(), llvm::StringRef::find(), llvm::StringRef::npos, llvm::StringRef::str(), llvm::StringRef::substr(), llvm::StringRef::take_front(), and llvm::to_integer().

Referenced by llvm::setCurrentDebugTypes().

◆ printDebugLogImpl()

void printDebugLogImpl ( )
static

Variable Documentation

◆ Debug

ManagedStatic<cl::opt<bool, true>, CreateDebug> Debug
static

Definition at line 147 of file Debug.cpp.

Referenced by SI().

◆ DebugBufferSize

ManagedStatic<cl::opt<unsigned>, CreateDebugBufferSize> DebugBufferSize
static

Definition at line 148 of file Debug.cpp.

Referenced by llvm::dbgs(), llvm::initDebugOptions(), and llvm::printDebugLog().

◆ DebugOnly

ManagedStatic<cl::opt<DebugOnlyOpt, true, cl::parser<std::string> >, CreateDebugOnly> DebugOnly
static

Definition at line 187 of file Debug.cpp.

Referenced by llvm::initDebugOptions().

◆ DebugOnlyOptLoc

DebugOnlyOpt DebugOnlyOptLoc
static

Definition at line 165 of file Debug.cpp.