mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
Zcu: remove unused parse_failure field from File.Status
These are reported as `astgen_failure` instead.
This commit is contained in:
parent
d3ca10d5d8
commit
5e20a47469
@ -687,7 +687,6 @@ pub const File = struct {
|
||||
pub const Status = enum {
|
||||
never_loaded,
|
||||
retryable_failure,
|
||||
parse_failure,
|
||||
astgen_failure,
|
||||
success_zir,
|
||||
};
|
||||
@ -852,7 +851,7 @@ pub const File = struct {
|
||||
|
||||
pub fn okToReportErrors(file: File) bool {
|
||||
return switch (file.status) {
|
||||
.parse_failure, .astgen_failure => false,
|
||||
.astgen_failure => false,
|
||||
else => true,
|
||||
};
|
||||
}
|
||||
@ -3299,7 +3298,7 @@ pub fn optimizeMode(zcu: *const Zcu) std.builtin.OptimizeMode {
|
||||
fn lockAndClearFileCompileError(zcu: *Zcu, file: *File) void {
|
||||
switch (file.status) {
|
||||
.success_zir, .retryable_failure => {},
|
||||
.never_loaded, .parse_failure, .astgen_failure => {
|
||||
.never_loaded, .astgen_failure => {
|
||||
zcu.comp.mutex.lock();
|
||||
defer zcu.comp.mutex.unlock();
|
||||
if (zcu.failed_files.fetchSwapRemove(file)) |kv| {
|
||||
|
||||
@ -109,7 +109,7 @@ pub fn astGenFile(
|
||||
|
||||
break :lock .shared;
|
||||
},
|
||||
.parse_failure, .astgen_failure, .success_zir => lock: {
|
||||
.astgen_failure, .success_zir => lock: {
|
||||
const unchanged_metadata =
|
||||
stat.size == file.stat.size and
|
||||
stat.mtime == file.stat.mtime and
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user