aboutsummaryrefslogtreecommitdiff
path: root/src/generator.c
diff options
context:
space:
mode:
authorpacien2018-06-05 14:35:02 +0200
committerpacien2018-06-05 14:35:02 +0200
commit13b4fc0a1e32008f125f73148d01f12bdac3a80e (patch)
treedd3dc79a76805220bcf825710e9e0c23f86a5d7f /src/generator.c
parent53e859913d6eb7141dbd1ed48f28c336f1322534 (diff)
downloadtpc-compiler-13b4fc0a1e32008f125f73148d01f12bdac3a80e.tar.gz
Simplify return type state on call
Diffstat (limited to 'src/generator.c')
-rw-r--r--src/generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/generator.c b/src/generator.c
index d5df545..126d2b1 100644
--- a/src/generator.c
+++ b/src/generator.c
@@ -110,7 +110,7 @@ void gen_function_return(Type expect, Type actual) {
110 gen_function_end_declaration(); 110 gen_function_end_declaration();
111} 111}
112 112
113int gen_function_call(const char name[], int nb_param) { 113Type gen_function_call(const char name[], int nb_param) {
114 Type return_type = fun_lookup(name, nb_param); 114 Type return_type = fun_lookup(name, nb_param);
115 fprintf(output, "call %s\n", name); 115 fprintf(output, "call %s\n", name);
116 if (return_type != VOID_T) fprintf(output, "push rax\n"); 116 if (return_type != VOID_T) fprintf(output, "push rax\n");