Emulate C99/C++11 __func__ for Visual C++.

llvm-svn: 202296
This commit is contained in:
Joerg Sonnenberger 2014-02-26 20:31:17 +00:00
parent 3d69c5cae4
commit 2b41390c89
1 changed files with 3 additions and 0 deletions

View File

@ -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}"