[clang] [MSP430] Default to unsigned char (PR #115964)
Alexander Richardson via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 12 16:13:53 PST 2024
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/115964
>From 712bbc59b1976a35c8aba4bdea8728d7e9f2b425 Mon Sep 17 00:00:00 2001
From: Alex Richardson <alexrichardson at google.com>
Date: Tue, 12 Nov 2024 16:02:17 -0800
Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=
=?UTF-8?q?itial=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/msp430-char.c | 5 +++++
2 files changed, 6 insertions(+)
create mode 100644 clang/test/Driver/msp430-char.c
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 0952262c360185..75379e0a00b981 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -1341,6 +1341,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
return false;
case llvm::Triple::hexagon:
+ case llvm::Triple::msp430:
case llvm::Triple::ppcle:
case llvm::Triple::ppc64le:
case llvm::Triple::riscv32:
diff --git a/clang/test/Driver/msp430-char.c b/clang/test/Driver/msp430-char.c
new file mode 100644
index 00000000000000..4f62eb167e1c84
--- /dev/null
+++ b/clang/test/Driver/msp430-char.c
@@ -0,0 +1,5 @@
+/// Check that char is unsigned by default.
+// RUN: %clang -### %s --target=msp430 -c 2>&1
+// RUN: %clang -### %s --target=msp430 -c 2>&1 | FileCheck%s
+// CHECK: "-cc1" "-triple" "msp430"
+// CHECK-SAME: "-fno-signed-char"
>From c719eb0c5868dc62f739a76b05a389102cf1500e Mon Sep 17 00:00:00 2001
From: Alex Richardson <alexrichardson at google.com>
Date: Tue, 12 Nov 2024 16:08:40 -0800
Subject: [PATCH 2/3] remove debug print
Created using spr 1.3.6-beta.1
---
clang/test/Driver/msp430-char.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/clang/test/Driver/msp430-char.c b/clang/test/Driver/msp430-char.c
index 4f62eb167e1c84..88ab443bafcaf2 100644
--- a/clang/test/Driver/msp430-char.c
+++ b/clang/test/Driver/msp430-char.c
@@ -1,5 +1,4 @@
/// Check that char is unsigned by default.
-// RUN: %clang -### %s --target=msp430 -c 2>&1
// RUN: %clang -### %s --target=msp430 -c 2>&1 | FileCheck%s
// CHECK: "-cc1" "-triple" "msp430"
// CHECK-SAME: "-fno-signed-char"
>From bcab1f35252103f65c3e86b857f8c554c68ccf1e Mon Sep 17 00:00:00 2001
From: Alex Richardson <alexrichardson at google.com>
Date: Tue, 12 Nov 2024 16:13:40 -0800
Subject: [PATCH 3/3] fix missing space in test
Created using spr 1.3.6-beta.1
---
clang/test/Driver/msp430-char.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/test/Driver/msp430-char.c b/clang/test/Driver/msp430-char.c
index 88ab443bafcaf2..67954e3e2a1be5 100644
--- a/clang/test/Driver/msp430-char.c
+++ b/clang/test/Driver/msp430-char.c
@@ -1,4 +1,4 @@
/// Check that char is unsigned by default.
-// RUN: %clang -### %s --target=msp430 -c 2>&1 | FileCheck%s
+// RUN: %clang -### %s --target=msp430 -c 2>&1 | FileCheck %s
// CHECK: "-cc1" "-triple" "msp430"
// CHECK-SAME: "-fno-signed-char"
More information about the cfe-commits
mailing list