Skip to content

Commit 052fd68

Browse files
arichardsongerekon
authored andcommitted
[Xtensa] Default to unsigned char
This matches GCC. Partially addresses llvm#115964 Pull Request: llvm#115967
1 parent 9b44599 commit 052fd68

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
@@ -1334,6 +1334,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
13341334
case llvm::Triple::riscv64:
13351335
case llvm::Triple::systemz:
13361336
case llvm::Triple::xcore:
1337+
case llvm::Triple::xtensa:
13371338
return false;
13381339
}
13391340
}

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)