[clang] [CSKY] Default to unsigned char (PR #115961)
Alexander Richardson via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 12 15:52:38 PST 2024
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/115961
This matches the ABI document found at
https://github.com/c-sky/csky-doc/blob/master/C-SKY_V2_CPU_Applications_Binary_Interface_Standards_Manual.pdf
Partially addresses https://github.com/llvm/llvm-project/issues/115957
>From 02dfea59a3655aecc2a1ffe3fbd89b1784f71eea Mon Sep 17 00:00:00 2001
From: Alex Richardson <alexrichardson at google.com>
Date: Tue, 12 Nov 2024 15:52:24 -0800
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.6-beta.1
---
clang/lib/Driver/ToolChains/Clang.cpp | 1 +
clang/test/Driver/csky-toolchain.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 0952262c360185..0476bb49e2c92e 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -1340,6 +1340,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
return true;
return false;
+ case llvm::Triple::csky:
case llvm::Triple::hexagon:
case llvm::Triple::ppcle:
case llvm::Triple::ppc64le:
diff --git a/clang/test/Driver/csky-toolchain.c b/clang/test/Driver/csky-toolchain.c
index 66485464652ac8..638ce64ec98cde 100644
--- a/clang/test/Driver/csky-toolchain.c
+++ b/clang/test/Driver/csky-toolchain.c
@@ -3,6 +3,7 @@
// RUN: %clang -### %s --target=csky 2>&1 | FileCheck -check-prefix=CC1 %s
// CC1: "-cc1" "-triple" "csky"
+// CC1: "-fno-signed-char"
// In the below tests, --rtlib=platform is used so that the driver ignores
// the configure-time CLANG_DEFAULT_RTLIB option when choosing the runtime lib
More information about the cfe-commits
mailing list