From 729379a1e19cb82b212bc3a6ba7a12274720bc2a Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Fri, 6 Oct 2017 23:09:55 +0000 Subject: 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 --- clang/test/CodeGen/pascal-wchar-string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/test/CodeGen/pascal-wchar-string.c') diff --git a/clang/test/CodeGen/pascal-wchar-string.c b/clang/test/CodeGen/pascal-wchar-string.c index 626fc99f15f..ac36e4028f4 100644 --- a/clang/test/CodeGen/pascal-wchar-string.c +++ b/clang/test/CodeGen/pascal-wchar-string.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -emit-llvm -o - %s -fpascal-strings -fshort-wchar | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - %s -fpascal-strings -fwchar-type=short -fno-signed-wchar | FileCheck %s // rdar://8020384 #include -- cgit v1.2.3