From e086d97bdb7d5c48130ea6a2641f51408dd8accd Mon Sep 17 00:00:00 2001 From: Sebastian Hack Date: Tue, 30 Nov 2004 13:27:13 +0000 Subject: [PATCH] Made ir_debug internal. [r4508] --- ir/ir/Makefile.in | 4 ++-- ir/ir/irprintf.h | 14 +++----------- ir/ir/irprintf_t.h | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 13 deletions(-) create mode 100644 ir/ir/irprintf_t.h diff --git a/ir/ir/Makefile.in b/ir/ir/Makefile.in index 32b0a15b6..e15ef08fa 100644 --- a/ir/ir/Makefile.in +++ b/ir/ir/Makefile.in @@ -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 diff --git a/ir/ir/irprintf.h b/ir/ir/irprintf.h index d2b9ebde0..794554659 100644 --- a/ir/ir/irprintf.h +++ b/ir/ir/irprintf.h @@ -20,6 +20,9 @@ #ifndef _IRPRINTF_H #define _IRPRINTF_H +#include +#include + /** * 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 index 000000000..3be314490 --- /dev/null +++ b/ir/ir/irprintf_t.h @@ -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 -- 2.20.1