aboutsummaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorDamien Firmenich <fir.damien@gmail.com>2022-04-05 17:08:33 +0200
committerGitHub <noreply@github.com>2022-04-05 18:08:33 +0300
commit5fafcc2b629e2ff00755b2bf45e903590f04aa9f (patch)
tree143bde0c47f71678a3d7f340073f519f7c41b7d2 /src/arch
parent95a87e88fac3fc563ac3baaf4eb8027341f4131e (diff)
downloadzig-5fafcc2b629e2ff00755b2bf45e903590f04aa9f.tar.gz
zig-5fafcc2b629e2ff00755b2bf45e903590f04aa9f.zip
zig fmt: remove trailing whitespace on doc comments
Fixes #11353 The renderer treats comments and doc comments differently since doc comments are parsed into the Ast. This commit adds a check after getting the text for the doc comment and trims whitespace at the end before rendering. The `a = 0,` in the test is here to avoid a ParseError while parsing the test.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/wasm/Mir.zig4
-rw-r--r--src/arch/x86_64/Mir.zig2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/wasm/Mir.zig b/src/arch/wasm/Mir.zig
index 27f683cf1e..b15dbd9020 100644
--- a/src/arch/wasm/Mir.zig
+++ b/src/arch/wasm/Mir.zig
@@ -10,7 +10,7 @@ const Mir = @This();
const std = @import("std");
-/// A struct of array that represents each individual wasm
+/// A struct of array that represents each individual wasm
instructions: std.MultiArrayList(Inst).Slice,
/// A slice of indexes where the meaning of the data is determined by the
/// `Inst.Tag` value.
@@ -538,7 +538,7 @@ pub const Inst = struct {
/// Contains an u32 index into a wasm section entry, such as a local.
/// Note: This is not an index to another instruction.
///
- /// Used by e.g. `local_get`, `local_set`, etc.
+ /// Used by e.g. `local_get`, `local_set`, etc.
label: u32,
/// A 32-bit immediate value.
///
diff --git a/src/arch/x86_64/Mir.zig b/src/arch/x86_64/Mir.zig
index a99cd58f06..50f28d7f19 100644
--- a/src/arch/x86_64/Mir.zig
+++ b/src/arch/x86_64/Mir.zig
@@ -364,7 +364,7 @@ pub const Inst = struct {
dbg_line,
/// push registers from the callee_preserved_regs
- /// data is the bitfield of which regs to push
+ /// data is the bitfield of which regs to push
/// for example on x86_64, the callee_preserved_regs are [_]Register{ .rcx, .rsi, .rdi, .r8, .r9, .r10, .r11 }; };
/// so to push rcx and r8 one would make data 0b00000000_00000000_00000000_00001001 (the first and fourth bits are set)
/// ops is unused