diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2016-06-23 19:02:09 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2016-06-23 19:02:09 +0000 |
| commit | 2cd2a18a9f14fbcb7364786d058caafdb359f523 (patch) | |
| tree | a630bc3edf812b2c0c489958ed41f26475fa02a7 | |
| parent | 8a12bd90353fb30068a7afbbef14d4ddd51ded28 (diff) | |
| download | bcm5719-llvm-2cd2a18a9f14fbcb7364786d058caafdb359f523.tar.gz bcm5719-llvm-2cd2a18a9f14fbcb7364786d058caafdb359f523.zip | |
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.
llvm-svn: 273599
| -rw-r--r-- | llvm/cmake/modules/HandleLLVMOptions.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index d25573304a0..493c1c9eb71 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -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) |

