translate-c: a little closer to self-hosted implementation

This commit is contained in:
Andrew Kelley
2019-04-21 17:24:58 -04:00
parent 56e07622c6
commit 976080462c
22 changed files with 1451 additions and 350 deletions

View File

@@ -1188,8 +1188,7 @@ int main(int argc, char **argv) {
zig_unreachable();
}
} else if (cmd == CmdTranslateC || cmd == CmdTranslateCUserland) {
AstNode *root_node = codegen_translate_c(g, in_file_buf, cmd == CmdTranslateCUserland);
ast_render(g, stdout, root_node, 4);
codegen_translate_c(g, in_file_buf, stdout, cmd == CmdTranslateCUserland);
if (timing_info)
codegen_print_timing_report(g, stderr);
return EXIT_SUCCESS;