diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-12-13 15:26:22 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-01-01 17:51:19 -0700 |
| commit | b162c3c820d8a6446bbdfba90b3c135ebcd76fcb (patch) | |
| tree | 1e3963fcd0f77ce45b7d9d432734adf33324b62e /src/Module.zig | |
| parent | bc4d2b646d5d09ecb86a3806886fed37e522fdc9 (diff) | |
| download | zig-b162c3c820d8a6446bbdfba90b3c135ebcd76fcb.tar.gz zig-b162c3c820d8a6446bbdfba90b3c135ebcd76fcb.zip | |
update bin_file.options references in Module (Zcu)
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/Module.zig b/src/Module.zig index 018037a46a..aa107ea3f7 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -3335,7 +3335,7 @@ pub fn ensureFuncBodyAnalyzed(mod: *Module, func_index: InternPool.Index) SemaEr const comp = mod.comp; - const no_bin_file = (comp.bin_file.options.emit == null and + const no_bin_file = (comp.bin_file == null and comp.emit_asm == null and comp.emit_llvm_ir == null and comp.emit_llvm_bc == null); @@ -4311,14 +4311,14 @@ fn scanDecl(iter: *ScanDeclIter, decl_sub_index: usize, flags: u4) Allocator.Err 1 => blk: { // test decl with no name. Skip the part where we check against // the test name filter. - if (!comp.bin_file.options.is_test) break :blk false; + if (!comp.config.is_test) break :blk false; if (decl_mod != mod.main_mod) break :blk false; try mod.test_functions.put(gpa, new_decl_index, {}); break :blk true; }, else => blk: { if (!is_named_test) break :blk false; - if (!comp.bin_file.options.is_test) break :blk false; + if (!comp.config.is_test) break :blk false; if (decl_mod != mod.main_mod) break :blk false; if (comp.test_filter) |test_filter| { if (mem.indexOf(u8, ip.stringToSlice(decl_name), test_filter) == null) { @@ -4627,7 +4627,7 @@ pub fn analyzeFnBody(mod: *Module, func_index: InternPool.Index, arena: Allocato // If we don't get an error return trace from a caller, create our own. if (func.analysis(ip).calls_or_awaits_errorable_fn and - mod.comp.bin_file.options.error_return_tracing and + mod.comp.config.error_tracing and !sema.fn_ret_ty.isError(mod)) { sema.setupErrorReturnTrace(&inner_block, last_arg_index) catch |err| switch (err) { @@ -5475,7 +5475,7 @@ pub fn populateTestFunctions( pub fn linkerUpdateDecl(mod: *Module, decl_index: Decl.Index) !void { const comp = mod.comp; - const no_bin_file = (comp.bin_file.options.emit == null and + const no_bin_file = (comp.bin_file == null and comp.emit_asm == null and comp.emit_llvm_ir == null and comp.emit_llvm_bc == null); @@ -5597,10 +5597,6 @@ pub fn addGlobalAssembly(mod: *Module, decl_index: Decl.Index, source: []const u } } -pub fn wantDllExports(mod: Module) bool { - return mod.comp.bin_file.options.dll_export_fns and mod.getTarget().os.tag == .windows; -} - pub fn getDeclExports(mod: Module, decl_index: Decl.Index) []const *Export { if (mod.decl_exports.get(decl_index)) |l| { return l.items; |
