remove concept of translate mode

This commit is contained in:
Vexu
2019-12-12 14:26:24 +02:00
parent d08dc21116
commit 69dee57d95
8 changed files with 15 additions and 54 deletions

View File

@@ -9020,10 +9020,6 @@ void codegen_translate_c(CodeGen *g, Buf *full_path, FILE *out_file, bool use_us
init(g);
Stage2TranslateMode trans_mode = buf_ends_with_str(full_path, ".h") ?
Stage2TranslateModeImport : Stage2TranslateModeTranslate;
ZigList<const char *> clang_argv = {0};
add_cc_args(g, clang_argv, nullptr, true);
@@ -9047,10 +9043,10 @@ void codegen_translate_c(CodeGen *g, Buf *full_path, FILE *out_file, bool use_us
if (use_userland_implementation) {
err = stage2_translate_c(&ast, &errors_ptr, &errors_len,
&clang_argv.at(0), &clang_argv.last(), trans_mode, resources_path);
&clang_argv.at(0), &clang_argv.last(), resources_path);
} else {
err = parse_h_file(g, &root_node, &errors_ptr, &errors_len, &clang_argv.at(0), &clang_argv.last(),
trans_mode, resources_path);
err = parse_h_file(g, &root_node, &errors_ptr, &errors_len, &clang_argv.at(0),
&clang_argv.last(), resources_path);
}
if (err == ErrorCCompileErrors && errors_len > 0) {