summaryrefslogtreecommitdiffstats
path: root/ast_to_hir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ast_to_hir.cpp')
-rw-r--r--ast_to_hir.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp
index ace80718d59..f7c82fab4bf 100644
--- a/ast_to_hir.cpp
+++ b/ast_to_hir.cpp
@@ -1095,9 +1095,7 @@ ast_function_definition::hir(exec_list *instructions,
"non-function", name);
signature = NULL;
} else {
- f = new ir_function();
- f->name = name;
-
+ f = new ir_function(name);
state->symbols->add_function(f->name, f);
}