[PATCH] D15784: Enable 2 warnings on MSVC, turn on StringPooling & intrinsic functions
Alexander Riccio via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 16 23:36:14 PST 2016
ariccio updated this revision to Diff 45091.
ariccio added a comment.
Wrapped /zc:strictStrings in a check for MSVC14.
http://reviews.llvm.org/D15784
Files:
C:/LLVM/llvm/cmake/modules/HandleLLVMOptions.cmake
Index: C:/LLVM/llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- C:/LLVM/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ C:/LLVM/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -363,6 +363,19 @@
append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ if(MSVC14)
+ # 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)
+ endif(MSVC14)
+
+ # 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.45091.patch
Type: text/x-patch
Size: 985 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160117/2d6cc970/attachment.bin>
More information about the llvm-commits
mailing list