summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beemitter.h
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-11-29 13:22:25 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2012-11-29 13:56:55 +0100
commit0f422870067627f102705b5f3e850f37c5abc1b7 (patch)
tree18731d45efdbf2153c6e84070e89fae68040ac0e /ir/be/beemitter.h
parent48feaf0618330fb060d22d5ef35c94dd7e9556a7 (diff)
beemit: Provide be_set_emitter() replacing identical functions in all backends.
Also use one common be_emit_nothing().
Diffstat (limited to 'ir/be/beemitter.h')
-rw-r--r--ir/be/beemitter.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ir/be/beemitter.h b/ir/be/beemitter.h
index 7be1320..0b0dcfc 100644
--- a/ir/be/beemitter.h
+++ b/ir/be/beemitter.h
@@ -33,6 +33,7 @@
#include "firm_types.h"
#include "obst.h"
#include "be.h"
+#include "irop_t.h"
/* don't use the following vars directly, they're only here for the inlines */
extern FILE *emit_file;
@@ -120,4 +121,16 @@ void be_emit_finish_line_gas(const ir_node *node);
*/
void be_emit_pad_comment(void);
+/**
+ * The type of a emitter function.
+ */
+typedef void emit_func(ir_node const *node);
+
+static inline void be_set_emitter(ir_op *const op, emit_func *const func)
+{
+ set_generic_function_ptr(op, func);
+}
+
+void be_emit_nothing(ir_node const *node);
+
#endif