summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beemitter.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2007-05-02 15:17:41 +0200
committerMatthias Braun <matze@braunis.de>2007-05-02 15:17:41 +0200
commit3740017a70006943d71f737f79dfca87071f7dc9 (patch)
tree1929ba3cdca1d44c1c83f909854d6d11b983d955 /ir/be/beemitter.c
parentaebc3c0c980bcc0536ffdc4cb2a545961b5a8b81 (diff)
add an tarval emit function
[r13585]
Diffstat (limited to 'ir/be/beemitter.c')
-rw-r--r--ir/be/beemitter.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ir/be/beemitter.c b/ir/be/beemitter.c
index dbdcb80..344d4a6 100644
--- a/ir/be/beemitter.c
+++ b/ir/be/beemitter.c
@@ -30,6 +30,8 @@
#include "beemitter.h"
#include "irprintf.h"
+#include "ident.h"
+#include "tv.h"
void be_emit_init_env(be_emit_env_t *env, FILE *F)
{
@@ -53,6 +55,14 @@ void be_emit_ident(be_emit_env_t *env, ident *id)
be_emit_string_len(env, str, len);
}
+void be_emit_tarval(be_emit_env_t *env, tarval *tv)
+{
+ char buf[64];
+
+ tarval_snprintf(buf, sizeof(buf), tv);
+ be_emit_string(env, buf);
+}
+
void be_emit_irvprintf(be_emit_env_t *env, const char *fmt, va_list args)
{
char buf[256];