diff options
| author | Ginger Bill <bill@gingerbill.org> | 2016-10-02 21:45:24 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2016-10-02 21:45:24 +0100 |
| commit | f6589d9814e2e26bee9b7941a23b4bef68582f2f (patch) | |
| tree | 0935e3f379dfe430b33f456325e0825f250b1eea /src/main.cpp | |
| parent | 264fc1e1f3006b3a9c6f25feab776ad6c7f32a25 (diff) | |
Refactor: Remove dead code
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9982f6b68..a464eb7e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -176,6 +176,8 @@ int main(int argc, char **argv) { isize base_name_len = gb_path_extension(output_name)-1 - output_name; String output = make_string(cast(u8 *)output_name, base_name_len); + int optimization_level = 0; + optimization_level = gb_clamp(optimization_level, 0, 3); i32 exit_code = 0; // For more passes arguments: http://llvm.org/docs/Passes.html @@ -199,11 +201,12 @@ int main(int argc, char **argv) { // For more arguments: http://llvm.org/docs/CommandGuide/llc.html exit_code = win32_exec_command_line_app( - "%.*sbin/llc %.*s.bc -filetype=obj -O0 " + "%.*sbin/llc %.*s.bc -filetype=obj -O%d " "%.*s " "", LIT(module_dir), LIT(output), + optimization_level, LIT(arch_data.llc_flags)); if (exit_code != 0) { return exit_code; |