diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-12-25 23:25:43 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-12-25 23:25:43 +0000 |
| commit | ad3467ee8997900b16a7239b79a33235923a3c0d (patch) | |
| tree | fa5579582ba25f07c32a6b9ee28784ed7c8d2e5f /clang/test | |
| parent | 03a102bff3bf1dbb37cac3f4e201e4b28b46a2fe (diff) | |
| download | bcm5719-llvm-ad3467ee8997900b16a7239b79a33235923a3c0d.tar.gz bcm5719-llvm-ad3467ee8997900b16a7239b79a33235923a3c0d.zip | |
The -fshort-wchar option causes wchar_t to become unsigned, in addition to being
16-bits in size. Implement this by splitting WChar into two enums, like we have
for char. This fixes a miscompmilation of XULRunner, PR8856.
llvm-svn: 122558
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGen/pascal-wchar-string.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/test/CodeGen/pascal-wchar-string.c b/clang/test/CodeGen/pascal-wchar-string.c index 89e4de489f0..7a03463d2cf 100644 --- a/clang/test/CodeGen/pascal-wchar-string.c +++ b/clang/test/CodeGen/pascal-wchar-string.c @@ -1,5 +1,7 @@ // RUN: %clang_cc1 -emit-llvm -o - %s -fpascal-strings -fshort-wchar | FileCheck %s -// rdar: // 8020384 +// rdar://8020384 + +#include <stddef.h> extern void abort (void); @@ -29,3 +31,11 @@ int main(int argc, char* argv[]) // CHECK: c"\03\00b\00a\00r\00\00\00" // CHECK: c"\04\00g\00o\00r\00f\00\00\00" + + +// PR8856 - -fshort-wchar makes wchar_t be unsigned. +// CHECK: @test2 +// CHECK: volatile store i32 1, i32* %isUnsigned +void test2() { + volatile int isUnsigned = (wchar_t)-1 > (wchar_t)0; +} |

