'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.
http://reviews.llvm.org/D5960
Files:
lib/Driver/Tools.cpp
test/Lexer/wchar-signedness.c
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -459,6 +459,8 @@
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;
Index: test/Lexer/wchar-signedness.c
===================================================================
--- test/Lexer/wchar-signedness.c
+++ test/Lexer/wchar-signedness.c
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits