summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beemitter.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-11-29 12:22:22 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2012-11-29 13:57:00 +0100
commitbdf50dd01ebd2861cb789c4783387673865e2420 (patch)
tree8878b91cfafd5555687964aa52d38feecae688ca /ir/be/beemitter.c
parent0f422870067627f102705b5f3e850f37c5abc1b7 (diff)
beemit: Provide be_emit_node(), which merges the (almost) identical node emit functions of the backends.
Diffstat (limited to 'ir/be/beemitter.c')
-rw-r--r--ir/be/beemitter.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ir/be/beemitter.c b/ir/be/beemitter.c
index 9d03a49..490cc0b 100644
--- a/ir/be/beemitter.c
+++ b/ir/be/beemitter.c
@@ -25,8 +25,10 @@
*/
#include "config.h"
+#include "bedwarf.h"
#include "beemitter.h"
#include "be_t.h"
+#include "error.h"
#include "irnode_t.h"
#include "irprintf.h"
#include "ident.h"
@@ -113,3 +115,12 @@ void be_emit_nothing(ir_node const *const node)
{
(void)node;
}
+
+void be_emit_node(ir_node const *const node)
+{
+ be_dwarf_location(get_irn_dbg_info(node));
+ ir_op *const op = get_irn_op(node);
+ emit_func *const emit = get_generic_function_ptr(emit_func, op);
+ DEBUG_ONLY(if (!emit) panic("no emit handler for node %+F (%+G, graph %+F)\n", node, node, get_irn_irg(node));)
+ emit(node);
+}