[clang] d204724 - [CSKY] Default to unsigned char
via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 9 12:18:55 PST 2025
Author: Alexander Richardson
Date: 2025-02-09T12:18:52-08:00
New Revision: d2047242e6d0f0deb7634ff22ab164354c520c79
URL: https://github.com/llvm/llvm-project/commit/d2047242e6d0f0deb7634ff22ab164354c520c79
DIFF: https://github.com/llvm/llvm-project/commit/d2047242e6d0f0deb7634ff22ab164354c520c79.diff
LOG: [CSKY] Default to unsigned char
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
Reviewed By: zixuan-wu
Pull Request: https://github.com/llvm/llvm-project/pull/115961
Added:
Modified:
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/csky-toolchain.c
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 821407687ffa1d..fe879e8f8bd277 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -1387,6 +1387,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
return true;
return false;
+ case llvm::Triple::csky:
case llvm::Triple::hexagon:
case llvm::Triple::msp430:
case llvm::Triple::ppcle:
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