]> granicus.if.org Git - clang/commit
CodeGenModule: Always output wchar_size, check LLVM assumptions.
authorMatthias Braun <matze@braunis.de>
Sat, 20 May 2017 01:29:55 +0000 (01:29 +0000)
committerMatthias Braun <matze@braunis.de>
Sat, 20 May 2017 01:29:55 +0000 (01:29 +0000)
commitf653e666c81bcae34fff50dd982ccf71bab0cd3f
treebfc7a3a3ca795163a5b260ed80e88a794bb8ebdf
parent9c391cd4664b80959fc4d0beb7be470a4c75d375
CodeGenModule: Always output wchar_size, check LLVM assumptions.

Re-commit r303463 now that LLVM is fixed and adjust some lit tests.

llvm::TargetLibraryInfo needs to know the size of wchar_t to work on
functions like `wcslen`. This patch changes clang to always emit the
wchar_size module flag (it would only do so for ARM previously).
This also adds an `assert()` to ensure the LLVM defaults based on the
target triple are in sync with clang.

Differential Revision: https://reviews.llvm.org/D32982

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303478 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenModule.cpp
test/CodeGen/wchar-size.c [new file with mode: 0644]
test/CodeGenCUDA/flush-denormals.cu
test/CodeGenCXX/strict-vtable-pointers.cpp