[clang] [CSKY] Default to unsigned char (PR #115961)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 12 15:53:08 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Alexander Richardson (arichardson)
<details>
<summary>Changes</summary>
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
---
Full diff: https://github.com/llvm/llvm-project/pull/115961.diff
2 Files Affected:
- (modified) clang/lib/Driver/ToolChains/Clang.cpp (+1)
- (modified) clang/test/Driver/csky-toolchain.c (+1)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/115961
More information about the cfe-commits
mailing list