| author | |
| committer | |
| log | 78df899b888df1c1b77a7630d94a08675f12f83e |
| tree | 893838e6791eca3ca74275d2b6b84078a097740c |
| parent | 97e23896a9168132b6d36ca22ae1af10dd53d80d |
| parent | ae8992629cc3d03379381ae37ab10d0e03edfd03 |
| signature |
3 files changed, 8 insertions(+), 7 deletions(-)
src/Module.zig+3-2| ... | ... | @@ -1250,6 +1250,7 @@ pub const ErrorMsg = struct { |
| 1250 | 1250 | comptime format: []const u8, |
| 1251 | 1251 | args: anytype, |
| 1252 | 1252 | ) !*ErrorMsg { |
| 1253 | assert(src_loc.lazy != .unneeded); | |
| 1253 | 1254 | const err_msg = try gpa.create(ErrorMsg); |
| 1254 | 1255 | errdefer gpa.destroy(err_msg); |
| 1255 | 1256 | err_msg.* = try ErrorMsg.init(gpa, src_loc, format, args); |
| ... | ... | @@ -3542,8 +3543,6 @@ pub fn semaFile(mod: *Module, file: *File) SemaError!void { |
| 3542 | 3543 | new_decl.ty = Type.type; |
| 3543 | 3544 | new_decl.alignment = .none; |
| 3544 | 3545 | new_decl.@"linksection" = .none; |
| 3545 | new_decl.has_tv = true; | |
| 3546 | new_decl.owns_tv = true; | |
| 3547 | 3546 | new_decl.alive = true; // This Decl corresponds to a File and is therefore always alive. |
| 3548 | 3547 | new_decl.analysis = .in_progress; |
| 3549 | 3548 | new_decl.generation = mod.generation; |
| ... | ... | @@ -3593,6 +3592,8 @@ pub fn semaFile(mod: *Module, file: *File) SemaError!void { |
| 3593 | 3592 | |
| 3594 | 3593 | new_namespace.ty = struct_ty.toType(); |
| 3595 | 3594 | new_decl.val = struct_ty.toValue(); |
| 3595 | new_decl.has_tv = true; | |
| 3596 | new_decl.owns_tv = true; | |
| 3596 | 3597 | new_decl.analysis = .complete; |
| 3597 | 3598 | |
| 3598 | 3599 | if (mod.comp.whole_cache_manifest) |whole_cache_manifest| { |
src/Sema.zig+3-3| ... | ... | @@ -2438,8 +2438,9 @@ fn errMsg( |
| 2438 | 2438 | src: LazySrcLoc, |
| 2439 | 2439 | comptime format: []const u8, |
| 2440 | 2440 | args: anytype, |
| 2441 | ) error{OutOfMemory}!*Module.ErrorMsg { | |
| 2441 | ) error{ NeededSourceLocation, OutOfMemory }!*Module.ErrorMsg { | |
| 2442 | 2442 | const mod = sema.mod; |
| 2443 | if (src == .unneeded) return error.NeededSourceLocation; | |
| 2443 | 2444 | const src_decl = mod.declPtr(block.src_decl); |
| 2444 | 2445 | return Module.ErrorMsg.create(sema.gpa, src.toSrcLoc(src_decl, mod), format, args); |
| 2445 | 2446 | } |
| ... | ... | @@ -2455,14 +2456,13 @@ pub fn fail( |
| 2455 | 2456 | return sema.failWithOwnedErrorMsg(block, err_msg); |
| 2456 | 2457 | } |
| 2457 | 2458 | |
| 2458 | fn failWithOwnedErrorMsg(sema: *Sema, block: ?*Block, err_msg: *Module.ErrorMsg) CompileError { | |
| 2459 | fn failWithOwnedErrorMsg(sema: *Sema, block: ?*Block, err_msg: *Module.ErrorMsg) error{ AnalysisFail, OutOfMemory } { | |
| 2459 | 2460 | @setCold(true); |
| 2460 | 2461 | const gpa = sema.gpa; |
| 2461 | 2462 | const mod = sema.mod; |
| 2462 | 2463 | |
| 2463 | 2464 | ref: { |
| 2464 | 2465 | errdefer err_msg.destroy(gpa); |
| 2465 | if (err_msg.src_loc.lazy == .unneeded) return error.NeededSourceLocation; | |
| 2466 | 2466 | |
| 2467 | 2467 | if (crash_report.is_enabled and mod.comp.debug_compile_errors) { |
| 2468 | 2468 | var wip_errors: std.zig.ErrorBundle.Wip = undefined; |
src/codegen/llvm/BitcodeReader.zig+2-2| ... | ... | @@ -51,8 +51,8 @@ pub const Block = struct { |
| 51 | 51 | pub const Record = struct { |
| 52 | 52 | name: []const u8, |
| 53 | 53 | id: u32, |
| 54 | operands: []u64, | |
| 55 | blob: []u8, | |
| 54 | operands: []const u64, | |
| 55 | blob: []const u8, | |
| 56 | 56 | |
| 57 | 57 | fn toOwnedAbbrev(record: Record, allocator: std.mem.Allocator) !Abbrev { |
| 58 | 58 | var operands = std.ArrayList(Abbrev.Operand).init(allocator); |