forked from OSchip/llvm-project
[Thumb] Clang thinks "char" is signed when using a thumb triple
'char' is unsigned on all ARM and Thumb architectures. Clang gets this right for ARM, and for thumb when using and arm triple and the -mthumb option, but gets it wrong for thumb triples. This fixes that. llvm-svn: 220555
This commit is contained in:
parent
a836924be4
commit
abed2eeaea
|
@ -459,6 +459,8 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
|
|||
case llvm::Triple::aarch64_be:
|
||||
case llvm::Triple::arm:
|
||||
case llvm::Triple::armeb:
|
||||
case llvm::Triple::thumb:
|
||||
case llvm::Triple::thumbeb:
|
||||
if (Triple.isOSDarwin() || Triple.isOSWindows())
|
||||
return true;
|
||||
return false;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -dM -E %s -triple x86_64-none-linux-gnu | FileCheck %s --check-prefix=CHECK-X86
|
||||
// RUN: %clang_cc1 -fsyntax-only -dM -E %s -triple armv7-none-eabi | FileCheck %s --check-prefix=CHECK-ARM
|
||||
// RUN: %clang_cc1 -fsyntax-only -dM -E %s -triple thumbv7-none-eabi | FileCheck %s --check-prefix=CHECK-ARM
|
||||
|
||||
// CHECK-X86-NOT: #define __WCHAR_UNSIGNED__
|
||||
// CHECK-X86: #define __WINT_UNSIGNED__ 1
|
||||
|
|
Loading…
Reference in New Issue