aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorVexu <git@vexu.eu>2019-12-12 14:26:24 +0200
committerVexu <git@vexu.eu>2019-12-12 14:26:24 +0200
commit69dee57d95271169898f8382f7e4846bf77a0040 (patch)
treeb8e2f3f6d25aa33714fd7696b215a969632fe6c8 /src/codegen.cpp
parentd08dc21116fb2f21b170930475ab122e668144e3 (diff)
downloadzig-69dee57d95271169898f8382f7e4846bf77a0040.tar.gz
zig-69dee57d95271169898f8382f7e4846bf77a0040.zip
remove concept of translate mode
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 5b0899544d..0ba2c23dbe 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -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) {