From: Götz Lindenmaier Date: Tue, 23 Apr 2002 09:22:28 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=cda93142e840288eb2b9504cf8b15bac806acf4e;p=libfirm *** empty log message *** [r369] --- diff --git a/ir/debug/Makefile.in b/ir/debug/Makefile.in index b4d1ae980..f3ab3c029 100644 --- a/ir/debug/Makefile.in +++ b/ir/debug/Makefile.in @@ -10,14 +10,17 @@ srcdir = @srcdir@ topdir = ../.. subdir := ir/debug +INSTALL_HEADERS = dbginfo.h -SOURCES = Makefile.in dbginfo.c dbginfo.h debinfo.c debinfo.h +SOURCES = $(INSTALL_HEADERS) + +SOURCES += Makefile.in dbginfo.c dbginfo.h include $(topdir)/MakeRules CPPFLAGS += -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/tv \ - -I$(top_srcdir)/ir/tr -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/st \ - -I$(top_srcdir)/ir/ana + -I$(top_srcdir)/ir/tr -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/ana \ + -I$(top_srcdir)/ir/st include $(top_srcdir)/MakeTargets diff --git a/ir/debug/dbginfo.c b/ir/debug/dbginfo.c index a6768b290..1f1ebef0f 100644 --- a/ir/debug/dbginfo.c +++ b/ir/debug/dbginfo.c @@ -18,9 +18,21 @@ #endif #include "dbginfo.h" +#include "irnode_t.h" inline void -dbg_info_copy(ir_node *new, ir_node *old, ident *info) { +set_irn_dbg_info(ir_node *n, struct dbg_info* db) { + n->dbi = db; +} + +inline struct dbg_info * +get_irn_dbg_info(ir_node *n) { + return n->dbi; +} + +inline void +dbg_info_copy(ir_node *nw, ir_node *old, ident *info) { + set_irn_dbg_info(new, get_irn_dbg_info(old)); } inline void diff --git a/ir/debug/dbginfo.h b/ir/debug/dbginfo.h index dd94c1875..7a059a01b 100644 --- a/ir/debug/dbginfo.h +++ b/ir/debug/dbginfo.h @@ -23,6 +23,11 @@ #include "irnode.h" #include "ident.h" +#ifndef _IR_NODE_TYPEDEF_ +#define _IR_NODE_TYPEDEF_ +typedef struct ir_node ir_node; +#endif + /* A datastructure containing information for debugging. */ typedef struct dbg_info dbg_info; /* Every Firm node contains a reference to a dbg_info struct. This reference @@ -31,6 +36,8 @@ typedef struct dbg_info dbg_info; void set_irn_dbg_info(irnode *n, dbg_info *d);. The module may not touch or change anything else in the Firm data structure. */ +inline void set_irn_dbg_info(ir_node *n, dbg_info* db); +inline dbg_info *get_irn_dbg_info(ir_node *n); /** The following routines are called by firm optmizations. The optimization passes an ident representing a string that describes the optimization @@ -40,7 +47,7 @@ typedef struct dbg_info dbg_info; might be a recent allocated node not containing any debug information, or just another node from somewhere in the graph with the same semantics. */ -void dbg_info_copy(ir_node *new, ir_node *old, ident *info); +void dbg_info_copy(ir_node *nw, ir_node *old, ident *info); /* dbg_info_merge() is called in the following situation: The optimization replaced a subgraph by another subgraph. There is no @@ -50,4 +57,6 @@ void dbg_info_copy(ir_node *new, ir_node *old, ident *info); void dbg_info_merge(ir_node **new_nodes, ir_node **old_nodes, ident *info); + + #endif /* _DBGINFO_H_ */