Made ir_debug internal.
authorSebastian Hack <hack@ipd.info.uni-karlsruhe.de>
Tue, 30 Nov 2004 13:27:13 +0000 (13:27 +0000)
committerSebastian Hack <hack@ipd.info.uni-karlsruhe.de>
Tue, 30 Nov 2004 13:27:13 +0000 (13:27 +0000)
[r4508]

ir/ir/Makefile.in
ir/ir/irprintf.h
ir/ir/irprintf_t.h [new file with mode: 0644]

index 32b0a15..e15ef08 100644 (file)
@@ -17,14 +17,14 @@ subdir := ir/ir
 
 INSTALL_HEADERS = irprog.h irgraph.h irnode.h irmode.h irop.h ircons.h \
                irflag.h irvrfy.h irgwalk.h irgmod.h iropt.h irdump.h   \
-               irgopt.h ircgcons.h ircgopt.h irreflect.h irarch.h
+               irgopt.h ircgcons.h ircgopt.h irreflect.h irarch.h irprintf.h
 
 SOURCES = $(INSTALL_HEADERS)
 
 SOURCES +=     Makefile.in \
                ircons.c ircons_t.h irgmod.c irgraph_t.h irnode.c iropt.c iropt_t.h irvrfy.c \
                irgwalk.c irgwalk_blk.c irdump.c irdumptxt.c irgopt.c irgopt_t.h irnode_t.h     \
-               irmode.c irop.c irprog.c irflag.c irflag_t.h irgraph.c irprintf.h \
+               irmode.c irop.c irprog.c irflag.c irflag_t.h irgraph.c irprintf_t.h \
                irmode_t.h irop_t.h irprog_t.h ircgcons.c ircgopt.c irreflect.c irarch.c irprintf.c
 
 include $(topdir)/MakeRules
index d2b9ebd..7945546 100644 (file)
@@ -20,6 +20,9 @@
 #ifndef _IRPRINTF_H
 #define _IRPRINTF_H
 
+#include <stddef.h>
+#include <stdio.h>
+
 /**
  * Something that can append strings and chars to something.
  */
@@ -101,16 +104,5 @@ void ir_fprintf(FILE *f, const char *fmt, ...);
  */
 void ir_snprintf(char *buf, size_t n, const char *fmt, ...);
 
-#ifdef DEBUG_libfirm
-
-#define ir_debugf(p)    ir_printf p
-#define ir_fdebugf(p)   ir_fprintf p
-
-#else
-
-#define ir_debugf(p)
-#define ir_fdebugf(p)
-
-#endif
 
 #endif
diff --git a/ir/ir/irprintf_t.h b/ir/ir/irprintf_t.h
new file mode 100644 (file)
index 0000000..3be3144
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Project:     libFIRM
+ * File name:   ir/ir/irprintf_t.h
+ * Purpose:     A little printf understanding some firm types.
+ * Author:      Sebastian Hack
+ * Created:     29.11.2004
+ * CVS-ID:      $Id$
+ * Copyright:   (c) 1998-2004 Universität Karlsruhe
+ * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ */
+
+#ifndef _IRPRINTF_T_H
+#define _IRPRINTF_T_H
+
+#include "irprintf.h"
+
+#ifdef DEBUG_libfirm
+
+#define ir_debugf    ir_printf
+#define ir_fdebugf   ir_fprintf
+
+#else
+
+static INLINE void ir_debugf(const char *fmt, ...)
+{
+}
+
+static INLINE void ir_fdebugf(FILE *f, const char *fmt, ...)
+{
+}
+
+#endif
+
+
+#endif