LLVM 20.0.0git
Namespaces | Macros | Functions | Variables
Debug.h File Reference

Go to the source code of this file.

Namespaces

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

Macros

#define DEBUG_WITH_TYPE(TYPE, X)
 DEBUG_WITH_TYPE macro - This macro should be used by passes to emit debug information.
 
#define LLVM_DEBUG(X)   DEBUG_WITH_TYPE(DEBUG_TYPE, X)
 

Functions

bool llvm::isCurrentDebugType (const char *Type)
 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.
 
void llvm::setCurrentDebugType (const char *Type)
 setCurrentDebugType - Set the current debug type, as if the -debug-only=X option were specified.
 
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.
 
raw_ostreamllvm::dbgs ()
 dbgs() - This returns a reference to a raw_ostream for debugging messages.
 

Variables

bool llvm::DebugFlag = false
 This boolean is set to true if the '-debug' command line option is specified.
 
bool llvm::EnableDebugBuffering = false
 EnableDebugBuffering - This defaults to false.
 

Macro Definition Documentation

◆ DEBUG_WITH_TYPE

#define DEBUG_WITH_TYPE (   TYPE,
  X 
)
Value:
} while (false)
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
bool DebugFlag
This boolean is set to true if the '-debug' command line option is specified.
Definition: Debug.cpp:45
bool isCurrentDebugType(const char *Type)
isCurrentDebugType - Return true if the specified string is the debug type specified on the command l...
Definition: Debug.cpp:52

DEBUG_WITH_TYPE macro - This macro should be used by passes to emit debug information.

If the '-debug' option is specified on the commandline, and if this is a debug build, then the code specified as the option to the macro will be executed. Otherwise it will not be. Example:

DEBUG_WITH_TYPE("bitset", dbgs() << "Bitset contains: " << Bitset << "\n");

This will emit the debug information if -debug is present, and -debug-only is not specified, or is specified as "bitset".

Definition at line 64 of file Debug.h.

◆ LLVM_DEBUG

#define LLVM_DEBUG (   X)    DEBUG_WITH_TYPE(DEBUG_TYPE, X)

Definition at line 101 of file Debug.h.