[PATCH] D15784: Enable 2 warnings on MSVC, turn on StringPooling & intrinsic functions
Alexander Riccio via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 27 15:08:11 PST 2015
ariccio updated this revision to Diff 43668.
ariccio added a comment.
Removed /Zc:rvalueCast flag for CMAKE_C_FLAGS.
http://reviews.llvm.org/D15784
Files:
cmake/modules/HandleLLVMOptions.cmake
Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -360,6 +360,20 @@
append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ # Disable string literal const->non-const type conversion
+ # "When specified, the compiler requires strict const-qualification
+ # conformance for pointers initialized by using string literals."
+ append("/Zc:strictStrings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+ # Eliminate Duplicate Strings
+ append("/GF" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+ # Generate Intrinsic Functions
+ append("/Oi" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+ # Enforce type conversion rules
+ append("/Zc:rvalueCast" CMAKE_CXX_FLAGS)
+
# Disable sized deallocation if the flag is supported. MSVC fails to compile
# the operator new overload in User otherwise.
check_c_compiler_flag("/WX /Zc:sizedDealloc-" SUPPORTS_SIZED_DEALLOC)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15784.43668.patch
Type: text/x-patch
Size: 989 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151227/201be682/attachment.bin>
More information about the llvm-commits
mailing list