mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
stage2: use std.zig.fmtId for builtin.zig source
This commit is contained in:
parent
70d100b1e2
commit
c10a2d7649
@ -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)});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user