diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2024-02-25 15:56:57 +0100 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2024-02-25 17:37:27 +0100 |
| commit | 1e1598950aeb20e8f414fdb3993109f05f1b4765 (patch) | |
| tree | 80e2028257e69c9c4d44954d00fe18d51eb159d4 /src/Sema.zig | |
| parent | 661137ac92ef05490a22dfcfb812a81a3014f0c7 (diff) | |
| download | zig-1e1598950aeb20e8f414fdb3993109f05f1b4765.tar.gz zig-1e1598950aeb20e8f414fdb3993109f05f1b4765.zip | |
llvm: implement per-module stripping
This avoids llvm module verification errors when the strip option
is different across modules.
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index 0a38cf93dc..972faff75f 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -6415,8 +6415,6 @@ fn zirDbgVar( inst: Zir.Inst.Index, air_tag: Air.Inst.Tag, ) CompileError!void { - if (block.is_comptime or block.ownerModule().strip) return; - const str_op = sema.code.instructions.items(.data)[@intFromEnum(inst)].str_op; const operand = try sema.resolveInst(str_op.operand); const name = str_op.getStr(sema.code); @@ -6430,6 +6428,8 @@ fn addDbgVar( air_tag: Air.Inst.Tag, name: []const u8, ) CompileError!void { + if (block.is_comptime or block.ownerModule().strip) return; + const mod = sema.mod; const operand_ty = sema.typeOf(operand); const val_ty = switch (air_tag) { |
