tarval_snprintf(buf, sizeof(buf), va_arg(args, tarval *));
break;
- case 'N':
+ case 'n':
{
ir_node *irn = va_arg(args, ir_node *);
snprintf(buf, sizeof(buf), "%s%s:%ld",
DUMP_STR(get_irn_opname(va_arg(args, ir_node *)));
break;
- case 'n':
+ case 'N':
snprintf(buf, sizeof(buf), "%ld", get_irn_node_nr(va_arg(args, ir_node *)));
break;
#ifndef _IRPRINTF_H
#define _IRPRINTF_H
+#include "config.h"
+
/**
* A string formatting routine for ir nodes.
* This function rudimentarily implements a kind of printf(3) for ir
* width specifiers are accepted.
* - %p A pointer.
* - %s A string.
- * - %N A full description of a node.
+ * - %n A full description of a node.
* - %o The opcode name of an ir node.
* - %m The mode name of an ir mode.
- * - %n The node number of an ir node.
+ * - %N The node number of an ir node.
* - %b The block node number of the nodes block.
* - %t A tarval.
*
*/
void ir_snprintf(char *buf, size_t n, const char *fmt, ...);
+#ifdef DEBUG_libfirm
+
+#define ir_debugf ir_printf
+#define ir_fdebugf ir_fprintf
+#define ir_sndebugf ir_snprintf
+
+#else
+
+static INLINE void ir_debugf(const char *fmt, ...)
+{
+}
+
+static INLINE void ir_fdebugf(FILE *, const char *fmt, ...)
+{
+}
+
+static INLINE void ir_sndebugf(char *buf, size_t n, const char *fmt, ...)
+{
+}
+
+#endif
+
#endif