[llvm] r273599 - Default to using the Unicode version of Win32 APIs instead of the ANSI version. This helps to catch instances where a developer accidentally forgets to explicitly specify which version of the API to use and accidentally winds up failing to support non-ASCII characters properly.
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 23 12:02:10 PDT 2016
Author: aaronballman
Date: Thu Jun 23 14:02:09 2016
New Revision: 273599
URL: http://llvm.org/viewvc/llvm-project?rev=273599&view=rev
Log:
Default to using the Unicode version of Win32 APIs instead of the ANSI version. This helps to catch instances where a developer accidentally forgets to explicitly specify which version of the API to use and accidentally winds up failing to support non-ASCII characters properly.
Modified:
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=273599&r1=273598&r2=273599&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Thu Jun 23 14:02:09 2016
@@ -249,6 +249,12 @@ if( MSVC )
-D_SCL_SECURE_NO_WARNINGS
)
+ # Tell MSVC to use the Unicode version of the Win32 APIs instead of ANSI.
+ add_llvm_definitions(
+ -DUNICODE
+ -D_UNICODE
+ )
+
set(msvc_warning_flags
# Disabled warnings.
-wd4141 # Suppress ''modifier' : used more than once' (because of __forceinline combined with inline)
More information about the llvm-commits
mailing list