diff options
Diffstat (limited to 'contrib/llvm/include/llvm/Support/Debug.h')
-rw-r--r-- | contrib/llvm/include/llvm/Support/Debug.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/contrib/llvm/include/llvm/Support/Debug.h b/contrib/llvm/include/llvm/Support/Debug.h index 6e21347..3465c40 100644 --- a/contrib/llvm/include/llvm/Support/Debug.h +++ b/contrib/llvm/include/llvm/Support/Debug.h @@ -29,6 +29,7 @@ #define LLVM_SUPPORT_DEBUG_H namespace llvm { + class raw_ostream; #ifndef NDEBUG @@ -50,6 +51,12 @@ bool isCurrentDebugType(const char *Type); /// void setCurrentDebugType(const char *Type); +/// setCurrentDebugTypes - Set the current debug type, as if the +/// -debug-only=X,Y,Z option were specified. Note that DebugFlag +/// also needs to be set to true for debug output to be produced. +/// +void setCurrentDebugTypes(const char **Types, unsigned Count); + /// 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 @@ -61,12 +68,13 @@ void setCurrentDebugType(const char *Type); /// is not specified, or is specified as "bitset". #define DEBUG_WITH_TYPE(TYPE, X) \ do { if (::llvm::DebugFlag && ::llvm::isCurrentDebugType(TYPE)) { X; } \ - } while (0) + } while (false) #else #define isCurrentDebugType(X) (false) #define setCurrentDebugType(X) -#define DEBUG_WITH_TYPE(TYPE, X) do { } while (0) +#define setCurrentDebugTypes(X, N) +#define DEBUG_WITH_TYPE(TYPE, X) do { } while (false) #endif /// EnableDebugBuffering - This defaults to false. If true, the debug @@ -91,6 +99,6 @@ raw_ostream &dbgs(); // #define DEBUG(X) DEBUG_WITH_TYPE(DEBUG_TYPE, X) -} // End llvm namespace +} // end namespace llvm -#endif +#endif // LLVM_SUPPORT_DEBUG_H |