add a new 'SetCurrentDebugType' API (requested by Andrew Haley for JIT

stuff) to programmatically control the current debug flavor.  While 
I'm at it, doxygenate Debug.h and clean it up.

llvm-svn: 85395
This commit is contained in:
Chris Lattner
2009-10-28 15:32:19 +00:00
parent 14ca753e28
commit fbaac77c70
2 changed files with 46 additions and 32 deletions

View File

@@ -57,7 +57,18 @@ DebugOnly("debug-only", cl::desc("Enable a specific type of debug output"),
bool llvm::isCurrentDebugType(const char *DebugType) {
return CurrentDebugType.empty() || DebugType == CurrentDebugType;
}
/// SetCurrentDebugType - Set the current debug type, as if the -debug-only=X
/// option were specified. Note that DebugFlag also needs to be set to true for
/// debug output to be produced.
///
void SetCurrentDebugType(const char *Type) {
CurrentDebugType = Type;
}
#else
// Avoid "has no symbols" warning.
namespace llvm {
int Debug_dummy = 0;
}
#endif