aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorgingerBill <ginger.bill.22@gmail.com>2016-07-30 00:09:30 +0100
committergingerBill <ginger.bill.22@gmail.com>2016-07-30 00:17:13 +0100
commit776dc0e8f1aa506ae0096c78ff10565e56c175e7 (patch)
tree946508a869196a3bf1d005e0ddffd182a1786a1d /src/main.cpp
parent32ab8fcf99df786c264ca566799b022c66cca34b (diff)
Restart LLVM IR SSA generation
This is the third go and I'm going for it!
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 1eed15dbc..64db9cbe8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3,7 +3,7 @@
#include "parser.cpp"
#include "printer.cpp"
#include "checker/checker.cpp"
-// #include "codegen/codegen.cpp"
+#include "codegen/codegen.cpp"
int main(int argc, char **argv) {
if (argc < 2) {
@@ -29,14 +29,13 @@ int main(int argc, char **argv) {
defer (destroy_checker(&checker));
check_parsed_files(&checker);
-#if 0
- Codegen codegen = {};
- if (init_codegen(&codegen, &checker)) {
- defer (destroy_codegen(&codegen));
- generate_code(&codegen, file_node);
+ ssaGen ssa = {};
+ if (ssa_gen_init(&ssa, &checker)) {
+ defer (ssa_gen_destroy(&ssa));
+
+ ssa_gen_code(&ssa);
}
-#endif
}
}
}