summaryrefslogtreecommitdiff
path: root/test/CodeGen/wchar-size.c
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-10-06 23:09:55 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-10-06 23:09:55 +0000
commitb623e4aa711a40eae845d6eabf2ea3b5303d391d (patch)
treea14d5c47af6678237ff827523a3e3f36af268542 /test/CodeGen/wchar-size.c
parentfe2683b0850c29250ab428c538948989d02d0409 (diff)
downloadclang-b623e4aa711a40eae845d6eabf2ea3b5303d391d.tar.gz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315126 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/wchar-size.c')
-rw-r--r--test/CodeGen/wchar-size.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGen/wchar-size.c b/test/CodeGen/wchar-size.c
index 38da462d98..28cd5d14d7 100644
--- a/test/CodeGen/wchar-size.c
+++ b/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.