diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-10-06 23:09:55 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-10-06 23:09:55 +0000 |
commit | 729379a1e19cb82b212bc3a6ba7a12274720bc2a (patch) | |
tree | bec003a8acebe5300df0cef7583108d8b930ed2c /clang/test/CodeGen/wchar-size.c | |
parent | d2f225fdef3120443b8f92382de5bacfc2985ba7 (diff) | |
download | bcm5719-llvm-729379a1e19cb82b212bc3a6ba7a12274720bc2a.tar.gz bcm5719-llvm-729379a1e19cb82b212bc3a6ba7a12274720bc2a.zip |
Driver: hoist the `wchar_t` handling to the driver
Move the logic for determining the `wchar_t` type information into the
driver. Rather than passing the single bit of information of
`-fshort-wchar` indicate to the frontend the desired type of `wchar_t`
through a new `-cc1` option of `-fwchar-type` and indicate the
signedness through `-f{,no-}signed-wchar`. This replicates the current
logic which was spread throughout Basic into the
`RenderCharacterOptions`.
Most of the changes to the tests are to ensure that the frontend uses
the correct type. Add a new test set under `test/Driver/wchar_t.c` to
ensure that we calculate the proper types for the various cases.
llvm-svn: 315126
Diffstat (limited to 'clang/test/CodeGen/wchar-size.c')
-rw-r--r-- | clang/test/CodeGen/wchar-size.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGen/wchar-size.c b/clang/test/CodeGen/wchar-size.c index 38da462d98c..28cd5d14d77 100644 --- a/clang/test/CodeGen/wchar-size.c +++ b/clang/test/CodeGen/wchar-size.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s -check-prefix=LONG-WCHAR // RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -emit-llvm -o - %s | FileCheck %s -check-prefix=SHORT-WCHAR -// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -o - -fshort-wchar %s | FileCheck %s -check-prefix=SHORT-WCHAR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -o - -fwchar-type=short -fno-signed-wchar %s | FileCheck %s -check-prefix=SHORT-WCHAR // Note: -fno-short-wchar implies the target default is used; so there is no // need to test this separately here. |