aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2021-05-20 17:07:06 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2021-05-20 17:14:18 +0200
commit5b850d5c9251900962e52154eb0fb9c2a344476d (patch)
tree56978e4ad48b44dc723a24d9b62c4d2fe6ab8a32 /src
parent4a582734fd84f2096ca9bb559387ddd04c70ed57 (diff)
downloadzig-5b850d5c9251900962e52154eb0fb9c2a344476d.tar.gz
zig-5b850d5c9251900962e52154eb0fb9c2a344476d.zip
Run `zig fmt` on src/ and lib/std/
This replaces callconv(.Inline) with the more idiomatic inline keyword.
Diffstat (limited to 'src')
-rw-r--r--src/DepTokenizer.zig5
-rw-r--r--src/libc_installation.zig3
-rw-r--r--src/link/MachO.zig2
-rw-r--r--src/link/MachO/reloc/aarch64.zig2
-rw-r--r--src/tracy.zig2
5 files changed, 5 insertions, 9 deletions
diff --git a/src/DepTokenizer.zig b/src/DepTokenizer.zig
index c8417f2df1..fb28b8e583 100644
--- a/src/DepTokenizer.zig
+++ b/src/DepTokenizer.zig
@@ -275,10 +275,7 @@ fn errorIllegalChar(comptime id: std.meta.Tag(Token), index: usize, char: u8) To
}
fn finishTarget(must_resolve: bool, bytes: []const u8) Token {
- return if (must_resolve)
- .{ .target_must_resolve = bytes }
- else
- .{ .target = bytes };
+ return if (must_resolve) .{ .target_must_resolve = bytes } else .{ .target = bytes };
}
const State = enum {
diff --git a/src/libc_installation.zig b/src/libc_installation.zig
index c681884054..a6826108d4 100644
--- a/src/libc_installation.zig
+++ b/src/libc_installation.zig
@@ -286,8 +286,7 @@ pub const LibCInstallation = struct {
else if (is_haiku)
"posix/errno.h"
else
- "sys/errno.h"
- ;
+ "sys/errno.h";
var path_i: usize = 0;
while (path_i < search_paths.items.len) : (path_i += 1) {
diff --git a/src/link/MachO.zig b/src/link/MachO.zig
index f0f25bea66..5e6d052896 100644
--- a/src/link/MachO.zig
+++ b/src/link/MachO.zig
@@ -2514,7 +2514,7 @@ fn allocatedSizeLinkedit(self: *MachO, start: u64) u64 {
return min_pos - start;
}
-fn checkForCollision(start: u64, end: u64, off: u64, size: u64) callconv(.Inline) ?u64 {
+inline fn checkForCollision(start: u64, end: u64, off: u64, size: u64) ?u64 {
const increased_size = padToIdeal(size);
const test_end = off + increased_size;
if (end > off and start < test_end) {
diff --git a/src/link/MachO/reloc/aarch64.zig b/src/link/MachO/reloc/aarch64.zig
index c08934d84b..c4b3104879 100644
--- a/src/link/MachO/reloc/aarch64.zig
+++ b/src/link/MachO/reloc/aarch64.zig
@@ -585,7 +585,7 @@ pub const Parser = struct {
}
};
-fn isArithmeticOp(inst: *const [4]u8) callconv(.Inline) bool {
+inline fn isArithmeticOp(inst: *const [4]u8) bool {
const group_decode = @truncate(u5, inst[3]);
return ((group_decode >> 2) == 4);
}
diff --git a/src/tracy.zig b/src/tracy.zig
index 3f6cf56588..6f56a87ce6 100644
--- a/src/tracy.zig
+++ b/src/tracy.zig
@@ -31,7 +31,7 @@ pub const Ctx = if (enable) ___tracy_c_zone_context else struct {
pub fn end(self: Ctx) void {}
};
-pub fn trace(comptime src: std.builtin.SourceLocation) callconv(.Inline) Ctx {
+pub inline fn trace(comptime src: std.builtin.SourceLocation) Ctx {
if (!enable) return .{};
const loc: ___tracy_source_location_data = .{