Skip to content

Commit 90d6251

Browse files
arichardsongerekon
authored andcommitted
[Xtensa] Default to unsigned char
This matches GCC. Partially addresses llvm#115964 Pull Request: llvm#115967
1 parent 89642ac commit 90d6251

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1352,6 +1352,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
13521352
case llvm::Triple::riscv64:
13531353
case llvm::Triple::systemz:
13541354
case llvm::Triple::xcore:
1355+
case llvm::Triple::xtensa:
13551356
return false;
13561357
}
13571358
}

clang/test/Driver/xtensa-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=xtensa -c 2>&1 | FileCheck %s
3+
// CHECK: "-cc1" "-triple" "xtensa"
4+
// CHECK-SAME: "-fno-signed-char"

0 commit comments

Comments
 (0)