Skip to content

Commit 7b7ae72

Browse files
authored
[MSP430] Default to unsigned char (#115964)
This matches the ABI document at https://www.ti.com/lit/pdf/slaa534 as well as the GCC implementation. Partially fixes #115957
1 parent e3e7c75 commit 7b7ae72

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Diff for: clang/lib/Driver/ToolChains/Clang.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
13411341
return false;
13421342

13431343
case llvm::Triple::hexagon:
1344+
case llvm::Triple::msp430:
13441345
case llvm::Triple::ppcle:
13451346
case llvm::Triple::ppc64le:
13461347
case llvm::Triple::riscv32:

Diff for: clang/test/Driver/msp430-char.c

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/// Check that char is unsigned by default.
2+
// RUN: %clang -### %s --target=msp430 -c 2>&1 | FileCheck %s
3+
// CHECK: "-cc1" "-triple" "msp430"
4+
// CHECK-SAME: "-fno-signed-char"

0 commit comments

Comments
 (0)