Merge pull request #15775 from r00ster91/newlines

remove some newlines and other minor cleanups
This commit is contained in:
Andrew Kelley 2023-07-11 23:06:12 -07:00 committed by GitHub
commit 660955c0d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 15 deletions

View File

@ -56,7 +56,6 @@ pub const StackTrace = struct {
std.debug.writeStackTrace(self, writer, arena.allocator(), debug_info, tty_config) catch |err| { std.debug.writeStackTrace(self, writer, arena.allocator(), debug_info, tty_config) catch |err| {
try writer.print("Unable to print stack trace: {s}\n", .{@errorName(err)}); try writer.print("Unable to print stack trace: {s}\n", .{@errorName(err)});
}; };
try writer.writeAll("\n");
} }
}; };
@ -191,10 +190,12 @@ pub const CallingConvention = enum(u8) {
/// This data structure is used by the Zig language code generation and /// This data structure is used by the Zig language code generation and
/// therefore must be kept in sync with the compiler implementation. /// therefore must be kept in sync with the compiler implementation.
pub const AddressSpace = enum(u5) { pub const AddressSpace = enum(u5) {
// CPU address spaces.
generic, generic,
gs, gs,
fs, fs,
ss, ss,
// GPU address spaces. // GPU address spaces.
global, global,
constant, constant,

View File

@ -1091,7 +1091,7 @@ fn analyzeBodyInner(
.add => try sema.zirArithmetic(block, inst, .add, true), .add => try sema.zirArithmetic(block, inst, .add, true),
.addwrap => try sema.zirArithmetic(block, inst, .addwrap, true), .addwrap => try sema.zirArithmetic(block, inst, .addwrap, true),
.add_sat => try sema.zirArithmetic(block, inst, .add_sat, true), .add_sat => try sema.zirArithmetic(block, inst, .add_sat, true),
.add_unsafe=> try sema.zirArithmetic(block, inst, .add_unsafe, false), .add_unsafe => try sema.zirArithmetic(block, inst, .add_unsafe, false),
.mul => try sema.zirArithmetic(block, inst, .mul, true), .mul => try sema.zirArithmetic(block, inst, .mul, true),
.mulwrap => try sema.zirArithmetic(block, inst, .mulwrap, true), .mulwrap => try sema.zirArithmetic(block, inst, .mulwrap, true),
.mul_sat => try sema.zirArithmetic(block, inst, .mul_sat, true), .mul_sat => try sema.zirArithmetic(block, inst, .mul_sat, true),
@ -35670,7 +35670,7 @@ pub fn analyzeAddressSpace(
ctx: AddressSpaceContext, ctx: AddressSpaceContext,
) !std.builtin.AddressSpace { ) !std.builtin.AddressSpace {
const mod = sema.mod; const mod = sema.mod;
const addrspace_tv = try sema.resolveInstConst(block, src, zir_ref, "addresspace must be comptime-known"); const addrspace_tv = try sema.resolveInstConst(block, src, zir_ref, "address space must be comptime-known");
const address_space = mod.toEnum(std.builtin.AddressSpace, addrspace_tv.val); const address_space = mod.toEnum(std.builtin.AddressSpace, addrspace_tv.val);
const target = sema.mod.getTarget(); const target = sema.mod.getTarget();
const arch = target.cpu.arch; const arch = target.cpu.arch;