diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-03-02 15:00:10 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-03-02 15:00:10 -0700 |
| commit | c10a2d7649c4c73c0235cac64bdd3e98ff93b8c6 (patch) | |
| tree | 4775be5d4b6193e74db2f642fa5341c9a0fca22f /src/Compilation.zig | |
| parent | 70d100b1e2997e9a8aaeb50840052b2571800a5a (diff) | |
| download | zig-c10a2d7649c4c73c0235cac64bdd3e98ff93b8c6.tar.gz zig-c10a2d7649c4c73c0235cac64bdd3e98ff93b8c6.zip | |
stage2: use std.zig.fmtId for builtin.zig source
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index d4e3981b85..bbe36d8fce 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2848,11 +2848,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8 const index = @intCast(std.Target.Cpu.Feature.Set.Index, index_usize); const is_enabled = target.cpu.features.isEnabled(index); if (is_enabled) { - // TODO some kind of "zig identifier escape" function rather than - // unconditionally using @"" syntax - try buffer.appendSlice(" .@\""); - try buffer.appendSlice(feature.name); - try buffer.appendSlice("\",\n"); + try buffer.writer().print(" .{},\n", .{std.zig.fmtId(feature.name)}); } } |
