[clang] b36f1c8 - [Xtensa] Default to unsigned char
via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 11:53:48 PST 2024
Author: Alexander Richardson
Date: 2024-12-02T11:53:45-08:00
New Revision: b36f1c8e9b0c9b9151be15b36a0f8d59ea8fc989
URL: https://github.com/llvm/llvm-project/commit/b36f1c8e9b0c9b9151be15b36a0f8d59ea8fc989
DIFF: https://github.com/llvm/llvm-project/commit/b36f1c8e9b0c9b9151be15b36a0f8d59ea8fc989.diff
LOG: [Xtensa] Default to unsigned char
This matches GCC.
Partially addresses https://github.com/llvm/llvm-project/pull/115964
Pull Request: https://github.com/llvm/llvm-project/pull/115967
Added:
clang/test/Driver/xtensa-char.c
Modified:
clang/lib/Driver/ToolChains/Clang.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index b6d39a5186b794..99a092d83d531a 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -1348,6 +1348,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
case llvm::Triple::riscv64:
case llvm::Triple::systemz:
case llvm::Triple::xcore:
+ case llvm::Triple::xtensa:
return false;
}
}
diff --git a/clang/test/Driver/xtensa-char.c b/clang/test/Driver/xtensa-char.c
new file mode 100644
index 00000000000000..13f8f67727e75d
--- /dev/null
+++ b/clang/test/Driver/xtensa-char.c
@@ -0,0 +1,4 @@
+/// Check that char is unsigned by default.
+// RUN: %clang -### %s --target=xtensa -c 2>&1 | FileCheck %s
+// CHECK: "-cc1" "-triple" "xtensa"
+// CHECK-SAME: "-fno-signed-char"
More information about the cfe-commits
mailing list