From 8e990b65f3a191473587601e50f3f6afe849a571 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Fri, 24 Aug 2012 18:10:41 +0200 Subject: [PATCH] Not labeling temps/blocks if opts_dump isn't specified --- ast.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ast.c b/ast.c index c039679..cfcef88 100644 --- a/ast.c +++ b/ast.c @@ -720,10 +720,17 @@ void ast_function_delete(ast_function *self) const char* ast_function_label(ast_function *self, const char *prefix) { - size_t id = (self->labelcount++); - size_t len = strlen(prefix); + size_t id; + size_t len; + char *from; - char *from = self->labelbuf + sizeof(self->labelbuf)-1; + if (!opts_dump) + return NULL; + + id = (self->labelcount++); + len = strlen(prefix); + + from = self->labelbuf + sizeof(self->labelbuf)-1; *from-- = 0; do { unsigned int digit = id % 10; -- 2.39.2