aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorGinger Bill <github@gingerbill.org>2016-10-26 15:05:41 +0100
committerGinger Bill <github@gingerbill.org>2016-10-26 15:05:41 +0100
commitaed7a83f5b8e812b3c2c31bdf745a3107da80190 (patch)
treee05d17f33801c8982d019ee56dd596d36f4e305a /src/main.cpp
parent6996df410456292b358b8deaabd5ba2aea7af069 (diff)
Code reorganization - Separate files and slice refactoring
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp13
1 files changed, 10 insertions, 3 deletions
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();