From 0132be7bf3fd02cfb8c31ffdeaddae918a76b295 Mon Sep 17 00:00:00 2001 From: Alex Rønne Petersen Date: Sun, 6 Apr 2025 17:02:22 +0200 Subject: std.Target: Rename charSignedness() to cCharSignedness(). To be consistent with the other functions that answer C ABI questions. --- lib/compiler/aro/aro/Compilation.zig | 2 +- lib/std/Target.zig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/compiler/aro/aro/Compilation.zig b/lib/compiler/aro/aro/Compilation.zig index 68bad1a5ce..798c192516 100644 --- a/lib/compiler/aro/aro/Compilation.zig +++ b/lib/compiler/aro/aro/Compilation.zig @@ -1087,7 +1087,7 @@ pub fn fixedEnumTagSpecifier(comp: *const Compilation) ?Type.Specifier { } pub fn getCharSignedness(comp: *const Compilation) std.builtin.Signedness { - return comp.langopts.char_signedness_override orelse comp.target.charSignedness(); + return comp.langopts.char_signedness_override orelse comp.target.cCharSignedness(); } /// Add built-in aro headers directory to system include paths diff --git a/lib/std/Target.zig b/lib/std/Target.zig index e9a973f2fd..ea7be17697 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -2695,7 +2695,7 @@ pub fn stackAlignment(target: Target) u16 { /// Default signedness of `char` for the native C compiler for this target /// Note that char signedness is implementation-defined and many compilers provide /// an option to override the default signedness e.g. GCC's -funsigned-char / -fsigned-char -pub fn charSignedness(target: Target) std.builtin.Signedness { +pub fn cCharSignedness(target: Target) std.builtin.Signedness { if (target.os.tag.isDarwin() or target.os.tag == .windows or target.os.tag == .uefi) return .signed; return switch (target.cpu.arch) { -- cgit v1.2.3