From aed7a83f5b8e812b3c2c31bdf745a3107da80190 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Wed, 26 Oct 2016 15:05:41 +0100 Subject: Code reorganization - Separate files and slice refactoring --- src/main.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 3010adb67..ac326eeab 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,9 +5,10 @@ #include "unicode.cpp" #include "tokenizer.cpp" #include "parser.cpp" -#include "printer.cpp" +// #include "printer.cpp" #include "checker/checker.cpp" -#include "codegen/codegen.cpp" +#include "ssa/ssa.cpp" +#include "llvm/ssa_to_text.cpp" // NOTE(bill): `name` is used in debugging and profiling modes i32 win32_exec_command_line_app(char *name, char *fmt, ...) { @@ -166,7 +167,13 @@ int main(int argc, char **argv) { ssa_gen_tree(&ssa); // TODO(bill): Speedup writing to file for IR code - ssa_gen_ir(&ssa); + { + ssaFileBuffer buf = {}; + ssa_file_buffer_init(&buf, &ssa.output_file); + defer (ssa_file_buffer_destroy(&buf)); + + ssa_print_llvm_ir(&buf, &ssa.module); + } prof_print_all(); -- cgit v1.2.3