diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-05-27 21:07:20 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-28 12:58:40 -0700 |
| commit | 554dd52c36711e9b07f35e20c3427027ad2fa60f (patch) | |
| tree | 23e81f39de48c91eef233aa594aa6bae82cc018f /src/stage1/ir.cpp | |
| parent | 4ea421f8cb3afc01f6822227b48123dd4844ec07 (diff) | |
| download | zig-554dd52c36711e9b07f35e20c3427027ad2fa60f.tar.gz zig-554dd52c36711e9b07f35e20c3427027ad2fa60f.zip | |
stage1: remove c_import_buf from Stage1Zir
All we need is a boolean in Stage1AstGen. This is part of an effort to
make Stage1Zir immutable.
Diffstat (limited to 'src/stage1/ir.cpp')
| -rw-r--r-- | src/stage1/ir.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stage1/ir.cpp b/src/stage1/ir.cpp index 9dac941795..5cae9a9a4f 100644 --- a/src/stage1/ir.cpp +++ b/src/stage1/ir.cpp @@ -5596,10 +5596,11 @@ Error ir_eval_const_value(CodeGen *codegen, Scope *scope, AstNode *node, ir_executable->source_node = source_node; ir_executable->name = exec_name; ir_executable->is_inline = true; - ir_executable->c_import_buf = c_import_buf; ir_executable->begin_scope = scope; - if (!stage1_astgen(codegen, node, scope, ir_executable, fn_entry)) + bool in_c_import_scope = c_import_buf != nullptr; + + if (!stage1_astgen(codegen, node, scope, ir_executable, fn_entry, in_c_import_scope)) return ErrorSemanticAnalyzeFail; if (ir_executable->first_err_trace_msg != nullptr) { |
