[compiler-rt] r202296 - Emulate C99/C++11 __func__ for Visual C++.
Joerg Sonnenberger
joerg at bec.de
Wed Feb 26 12:31:18 PST 2014
Author: joerg
Date: Wed Feb 26 14:31:17 2014
New Revision: 202296
URL: http://llvm.org/viewvc/llvm-project?rev=202296&view=rev
Log:
Emulate C99/C++11 __func__ for Visual C++.
Modified:
compiler-rt/trunk/cmake/Modules/CompilerRTCompile.cmake
Modified: compiler-rt/trunk/cmake/Modules/CompilerRTCompile.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/CompilerRTCompile.cmake?rev=202296&r1=202295&r2=202296&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/CompilerRTCompile.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/CompilerRTCompile.cmake Wed Feb 26 14:31:17 2014
@@ -11,6 +11,9 @@ macro(clang_compile object_file source)
if(NOT COMPILER_RT_STANDALONE_BUILD)
list(APPEND SOURCE_DEPS clang)
endif()
+ if (MSVC)
+ list(APPEND SOURCE_CFLAGS -D__func__=__FUNCTION__)
+ endif()
add_custom_command(
OUTPUT ${object_file}
COMMAND ${COMPILER_RT_TEST_COMPILER} ${SOURCE_CFLAGS} -c -o "${object_file}"
More information about the llvm-commits
mailing list