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

Go to the source code of this file.

Namespaces

 llvm
 ---------------------— PointerInfo ------------------------------------—
 

Macros

#define DEBUG_WITH_TYPE(TYPE, X)
 DEBUG_WITH_TYPE macro - This macro should be used by passes to emit debug information. More...
 
#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. More...
 
void llvm::setCurrentDebugType (const char *Type)
 setCurrentDebugType - Set the current debug type, as if the -debug-only=X option were specified. More...
 
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. More...
 
raw_ostreamllvm::dbgs ()
 dbgs() - This returns a reference to a raw_ostream for debugging messages. More...
 

Variables

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

These flags turns on/off that are expensive and are turned off by default, unless macro EXPENSIVE_CHECKS is defined.

The flags allow selectively turning the checks on without need to recompile.

bool llvm::VerifyDomInfo = false
 Enables verification of dominator trees. More...
 
bool llvm::VerifyLoopInfo = false
 Enables verification of loop info. More...
 
bool llvm::VerifyMemorySSA = false
 Enables verification of MemorySSA. More...
 
Verification flags.

These flags turns on/off that are expensive and are turned off by default, unless macro EXPENSIVE_CHECKS is defined.

The flags allow selectively turning the checks on without need to recompile.

bool llvm::VerifyDomInfo = false
 Enables verification of dominator trees. More...
 
bool llvm::VerifyLoopInfo = false
 Enables verification of loop info. More...
 
bool llvm::VerifyMemorySSA = false
 Enables verification of MemorySSA. More...
 

Macro Definition Documentation

◆ DEBUG_WITH_TYPE

#define DEBUG_WITH_TYPE (   TYPE,
  X 
)
Value:
do { if (::llvm::DebugFlag && ::llvm::isCurrentDebugType(TYPE)) { X; } \
} while (false)

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

In 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 122 of file Debug.h.

X
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
llvm::isCurrentDebugType
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
llvm::DebugFlag
bool DebugFlag
This boolean is set to true if the '-debug' command line option is specified.
Definition: Debug.cpp:45