diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-01-05 14:50:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-05 14:50:02 -0500 |
| commit | a0ca34979ea5ff9be0d353f539e7c86dedbf8693 (patch) | |
| tree | e81c0dbbc2b7b81ce1d6f46b79ee781e31326ebc /src/main.cpp | |
| parent | 2e5342512f32384777ebcb0bf3dcb177b9380080 (diff) | |
| parent | 242f5d10d57eb9239e7a89d4e705fc05785abe7c (diff) | |
| download | zig-a0ca34979ea5ff9be0d353f539e7c86dedbf8693.tar.gz zig-a0ca34979ea5ff9be0d353f539e7c86dedbf8693.zip | |
Merge pull request #4053 from ziglang/test-run-translated-c
add test harness for "run translated C" tests
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index ea9f089072..8a661bfa05 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1164,7 +1164,7 @@ int main(int argc, char **argv) { return print_error_usage(arg0); } - Buf *zig_root_source_file = cmd == CmdTranslateC ? nullptr : in_file_buf; + Buf *zig_root_source_file = (cmd == CmdTranslateC) ? nullptr : in_file_buf; if (cmd == CmdRun && buf_out_name == nullptr) { buf_out_name = buf_create_from_str("run"); @@ -1330,7 +1330,8 @@ int main(int argc, char **argv) { zig_unreachable(); } } else if (cmd == CmdTranslateC) { - codegen_translate_c(g, in_file_buf, stdout); + g->enable_cache = get_cache_opt(enable_cache, false); + codegen_translate_c(g, in_file_buf); if (timing_info) codegen_print_timing_report(g, stderr); return main_exit(root_progress_node, EXIT_SUCCESS); |
