[compiler-rt] r216450 - [ASan/Win] Disable warning C4391: incorrect return type for intrinsic function

Timur Iskhodzhanov timurrrr at google.com
Tue Aug 26 05:33:00 PDT 2014


Author: timurrrr
Date: Tue Aug 26 07:33:00 2014
New Revision: 216450

URL: http://llvm.org/viewvc/llvm-project?rev=216450&view=rev
Log:
[ASan/Win] Disable warning C4391: incorrect return type for intrinsic function

This warning makes it a bit hard to define strlen and wcslen interceptors in an elegant yet portable way

Modified:
    compiler-rt/trunk/CMakeLists.txt
    compiler-rt/trunk/cmake/config-ix.cmake

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=216450&r1=216449&r2=216450&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Tue Aug 26 07:33:00 2014
@@ -273,6 +273,7 @@ append_if(COMPILER_RT_HAS_WNO_GNU_FLAG -
 append_if(COMPILER_RT_HAS_WNO_VARIADIC_MACROS_FLAG -Wno-variadic-macros SANITIZER_COMMON_CFLAGS)
 append_if(COMPILER_RT_HAS_WNO_C99_EXTENSIONS_FLAG -Wno-c99-extensions SANITIZER_COMMON_CFLAGS)
 append_if(COMPILER_RT_HAS_WNO_NON_VIRTUAL_DTOR_FLAG -Wno-non-virtual-dtor SANITIZER_COMMON_CFLAGS)
+append_if(COMPILER_RT_HAS_WD4391_FLAG /wd4391 SANITIZER_COMMON_CFLAGS)
 append_if(COMPILER_RT_HAS_WD4722_FLAG /wd4722 SANITIZER_COMMON_CFLAGS)
 
 if(APPLE)

Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=216450&r1=216449&r2=216450&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Tue Aug 26 07:33:00 2014
@@ -39,6 +39,7 @@ check_cxx_compiler_flag("-Werror -Wno-va
 
 check_cxx_compiler_flag(/W3 COMPILER_RT_HAS_W3_FLAG)
 check_cxx_compiler_flag(/WX COMPILER_RT_HAS_WX_FLAG)
+check_cxx_compiler_flag(/wd4391 COMPILER_RT_HAS_WD4391_FLAG)
 check_cxx_compiler_flag(/wd4722 COMPILER_RT_HAS_WD4722_FLAG)
 
 # Symbols.





More information about the llvm-commits mailing list