From f73a0588fdd1a3db87b1f359c60f1cd90fbdfb93 Mon Sep 17 00:00:00 2001 From: Sebastian Hack Date: Thu, 16 Dec 2004 10:28:59 +0000 Subject: [PATCH] Fixed a tiny bug. [r4670] --- ir/common/debug.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ir/common/debug.h b/ir/common/debug.h index 2f0c53aff..b63a2619f 100644 --- a/ir/common/debug.h +++ b/ir/common/debug.h @@ -63,19 +63,21 @@ unsigned firm_dbg_get_mask(const firm_dbg_module_t *module); */ void firm_dbg_set_file(firm_dbg_module_t *module, FILE *file); +#define _DBG_MAIN(func,args) \ + _firm_dbg_print_msg(__FILE__, __LINE__, func, _firm_dbg_make_msg args) /* If we have C99 use the __func__ variable for calling functions name. */ #if defined(__STD_VERSION__) && __STD_VERSION >= 199901L -#define _DBG(args) _firm_dbg_print_msg(__FILE__, __LINE__, __func__, _firm_dbg_make_msg args) +#define _DBG(args) _DBG_MAIN(__func__, args) #else /* Else, check for gcc and use the proprietary __FUNCTION__ macro. */ #ifdef __GNUC__ -#define _DBG(args) _firm_dbg_print_msg(__FILE__, __LINE__, __FUNCTION__, _firm_dbg_make_msg args) +#define _DBG(args) _DBG_MAIN(__FUNCTION__, args) #else /* Else go without the name of the calling function. */ -#define _DBG(args) _firm_dbg_print_msg(__FILE__, __LINE__, "", _firm_dbg_make_msg args) +#define _DBG(args) _DBG_MAIN("", args) #endif #endif @@ -86,7 +88,7 @@ void firm_dbg_set_file(firm_dbg_module_t *module, FILE *file); */ #define DBG_RETAIL(args) _DBG(args) -#ifdef DEBUG +#ifdef DEBUG_libfirm /** * Issue a debug message. -- 2.20.1