Skip to content

Commit aa52bb8

Browse files
committed
zig fmt
1 parent a59c35c commit aa52bb8

File tree

17 files changed

+35
-35
lines changed

17 files changed

+35
-35
lines changed

lib/std/Build/Module.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ pub fn appendZigProcessFlags(
572572
try zig_args.append(switch (unwind_tables) {
573573
.none => "-fno-unwind-tables",
574574
.sync => "-funwind-tables",
575-
.@"async" => "-fasync-unwind-tables",
575+
.async => "-fasync-unwind-tables",
576576
});
577577
}
578578

lib/std/Target.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ pub const Cpu = struct {
16911691
pub fn fromCallingConvention(cc: std.builtin.CallingConvention.Tag) []const Arch {
16921692
return switch (cc) {
16931693
.auto,
1694-
.@"async",
1694+
.async,
16951695
.naked,
16961696
.@"inline",
16971697
=> unreachable,

lib/std/builtin.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ pub const CallingConvention = union(enum(u8)) {
246246
/// The calling convention of a function that can be called with `async` syntax. An `async` call
247247
/// of a runtime-known function must target a function with this calling convention.
248248
/// Comptime-known functions with other calling conventions may be coerced to this one.
249-
@"async",
249+
async,
250250

251251
/// Functions with this calling convention have no prologue or epilogue, making the function
252252
/// uncallable in regular Zig code. This can be useful when integrating with assembly.
@@ -849,7 +849,7 @@ pub const LinkMode = enum {
849849
pub const UnwindTables = enum {
850850
none,
851851
sync,
852-
@"async",
852+
async,
853853
};
854854

855855
/// This data structure is used by the Zig language code generation and

lib/std/zig/llvm/Builder.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,9 +1521,9 @@ pub const Attribute = union(Kind) {
15211521
pub const UwTable = enum(u32) {
15221522
none,
15231523
sync,
1524-
@"async",
1524+
async,
15251525

1526-
pub const default = UwTable.@"async";
1526+
pub const default = UwTable.async;
15271527
};
15281528

15291529
pub const VScaleRange = packed struct(u32) {

src/Compilation.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6466,7 +6466,7 @@ pub fn addCCArgs(
64666466
try argv.append("-fno-asynchronous-unwind-tables");
64676467
try argv.append("-funwind-tables");
64686468
},
6469-
.@"async" => try argv.append("-fasynchronous-unwind-tables"),
6469+
.async => try argv.append("-fasynchronous-unwind-tables"),
64706470
}
64716471

64726472
try argv.append("-nostdinc");

src/Sema.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26687,7 +26687,7 @@ fn explainWhyTypeIsNotExtern(
2668726687
}
2668826688
switch (ty.fnCallingConvention(zcu)) {
2668926689
.auto => try sema.errNote(src_loc, msg, "extern function must specify calling convention", .{}),
26690-
.@"async" => try sema.errNote(src_loc, msg, "async function cannot be extern", .{}),
26690+
.async => try sema.errNote(src_loc, msg, "async function cannot be extern", .{}),
2669126691
.@"inline" => try sema.errNote(src_loc, msg, "inline function cannot be extern", .{}),
2669226692
else => return,
2669326693
}

src/Type.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ pub fn print(ty: Type, writer: anytype, pt: Zcu.PerThread) @TypeOf(writer).Error
382382
}
383383
}
384384
switch (fn_info.cc) {
385-
.auto, .@"async", .naked, .@"inline" => try writer.print("callconv(.{}) ", .{std.zig.fmtId(@tagName(fn_info.cc))}),
385+
.auto, .async, .naked, .@"inline" => try writer.print("callconv(.{}) ", .{std.zig.fmtId(@tagName(fn_info.cc))}),
386386
else => try writer.print("callconv({any}) ", .{fn_info.cc}),
387387
}
388388
}

src/Zcu.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4453,7 +4453,7 @@ pub fn callconvSupported(zcu: *Zcu, cc: std.builtin.CallingConvention) union(enu
44534453
const backend = target_util.zigBackend(target, zcu.comp.config.use_llvm);
44544454
switch (cc) {
44554455
.auto, .@"inline" => return .ok,
4456-
.@"async" => return .{ .bad_backend = backend }, // nothing supports async currently
4456+
.async => return .{ .bad_backend = backend }, // nothing supports async currently
44574457
.naked => {}, // depends only on backend
44584458
else => for (cc.archs()) |allowed_arch| {
44594459
if (allowed_arch == target.cpu.arch) break;

src/codegen/llvm.zig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2758,7 +2758,7 @@ pub const Object = struct {
27582758
llvm_arg_i += 1;
27592759
}
27602760

2761-
if (fn_info.cc == .@"async") {
2761+
if (fn_info.cc == .async) {
27622762
@panic("TODO: LLVM backend lower async function");
27632763
}
27642764

@@ -2910,7 +2910,7 @@ pub const Object = struct {
29102910
try attributes.addFnAttr(.nounwind, &o.builder);
29112911
if (owner_mod.unwind_tables != .none) {
29122912
try attributes.addFnAttr(
2913-
.{ .uwtable = if (owner_mod.unwind_tables == .@"async") .@"async" else .sync },
2913+
.{ .uwtable = if (owner_mod.unwind_tables == .async) .async else .sync },
29142914
&o.builder,
29152915
);
29162916
}
@@ -11871,7 +11871,7 @@ fn toLlvmCallConvTag(cc_tag: std.builtin.CallingConvention.Tag, target: *const s
1187111871
}
1187211872
return switch (cc_tag) {
1187311873
.@"inline" => unreachable,
11874-
.auto, .@"async" => .fastcc,
11874+
.auto, .async => .fastcc,
1187511875
.naked => .ccc,
1187611876
.x86_64_sysv => .x86_64_sysvcc,
1187711877
.x86_64_win => .win64cc,
@@ -12379,7 +12379,7 @@ const ParamTypeIterator = struct {
1237912379
return .byval;
1238012380
}
1238112381
},
12382-
.@"async" => {
12382+
.async => {
1238312383
@panic("TODO implement async function lowering in the LLVM backend");
1238412384
},
1238512385
.x86_64_sysv => return it.nextSystemV(ty),
@@ -12634,7 +12634,7 @@ fn ccAbiPromoteInt(
1263412634
) ?std.builtin.Signedness {
1263512635
const target = zcu.getTarget();
1263612636
switch (cc) {
12637-
.auto, .@"inline", .@"async" => return null,
12637+
.auto, .@"inline", .async => return null,
1263812638
else => {},
1263912639
}
1264012640
const int_info = switch (ty.zigTypeTag(zcu)) {

src/libs/libcxx.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildErr
325325
// See the `-fno-exceptions` logic for WASI.
326326
// The old 32-bit x86 variant of SEH doesn't use tables.
327327
const unwind_tables: std.builtin.UnwindTables =
328-
if (target.os.tag == .wasi or (target.cpu.arch == .x86 and target.os.tag == .windows)) .none else .@"async";
328+
if (target.os.tag == .wasi or (target.cpu.arch == .x86 and target.os.tag == .windows)) .none else .async;
329329

330330
const config = Compilation.Config.resolve(.{
331331
.output_mode = output_mode,

0 commit comments

Comments
 (0)