X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fcommon%2Fdebug.h;h=0fabe2b5d5b41854e690957a4f157ac478e938db;hb=afbbc0b1ccd684c4c24bfd43d0f994123245f39f;hp=5f32588a18ae56d708d38d543dc52f91271aac5a;hpb=af64fb525b556cb9550c8ef9c209993dae294f01;p=libfirm diff --git a/ir/common/debug.h b/ir/common/debug.h index 5f32588a1..0fabe2b5d 100644 --- a/ir/common/debug.h +++ b/ir/common/debug.h @@ -1,52 +1,36 @@ -/** - * Debug facility. - * @author Michael Beck, Sebastian Hack - * @date 15.12.2004 +/* + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. * - * $Id$ + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. */ -#ifndef _FIRM_DEBUG_H -#define _FIRM_DEBUG_H +/** + * @file + * @brief Debug facility. + * @author Michael Beck, Sebastian Hack + * @date 15.12.2004 + * @version $Id$ + */ +#ifndef FIRM_COMMON_DEBUG_H +#define FIRM_COMMON_DEBUG_H #include "firm_config.h" -#ifdef DEBUG_libfirm - /* WITH DEBUG OUTPUT */ - -#ifdef WITH_LIBCORE - -#define DBG(x) _LC_DBG(x) -#define DB(x) _LC_DB(x) - -#include - -/* use the newer debug implementation in libcore */ -typedef lc_dbg_module_t firm_dbg_module_t; - -extern firm_dbg_module_t *firm_dbg_register(const char *name); - -#define firm_dbg_set_mask(module, mask) lc_dbg_set_mask(module, mask) -#define firm_dbg_get_mask(module) lc_dbg_get_mask(module) -#define firm_dbg_set_file(module, file) lc_dbg_set_file(module, file) - -#define LEVEL_DEFAULT LC_LEVEL_DEFAULT -#define LEVEL_1 LC_LEVEL_1 -#define LEVEL_2 LC_LEVEL_2 -#define LEVEL_3 LC_LEVEL_3 -#define LEVEL_4 LC_LEVEL_4 -#define LEVEL_5 LC_LEVEL_5 -#define SET_LEVEL_0 LC_SET_LEVEL_0 -#define SET_LEVEL_1 LC_SET_LEVEL_1 -#define SET_LEVEL_2 LC_SET_LEVEL_2 -#define SET_LEVEL_3 LC_SET_LEVEL_3 -#define SET_LEVEL_4 LC_SET_LEVEL_4 -#define SET_LEVEL_5 LC_SET_LEVEL_5 -#define SET_LEVEL_ALL LC_SET_LEVEL_ALL - -#else /* WITH_LIBCORE */ -/* use the builtin debug implementation */ +#ifdef DEBUG_libfirm #include @@ -163,8 +147,6 @@ void firm_dbg_set_file(firm_dbg_module_t *module, FILE *file); #define DBG(args) _DBG(args) #define DB(args) _DB(args) -#endif /* WITH_LIBCORE */ - /** create a debug handle in debug mode */ #define FIRM_DBG_REGISTER(handle, name) handle = firm_dbg_register(name) #define DEBUG_ONLY(code) code @@ -188,4 +170,4 @@ void firm_dbg_set_file(firm_dbg_module_t *module, FILE *file); #endif /* DEBUG_libfirm */ -#endif /* _FIRM_DEBUG_H */ +#endif