[libc++] Do not define _LIBCPP_CLANG_VER for non-LLVM Clang
authorLouis Dionne <ldionne@apple.com>
Wed, 14 Aug 2019 17:01:08 +0000 (17:01 +0000)
committerLouis Dionne <ldionne@apple.com>
Wed, 14 Aug 2019 17:01:08 +0000 (17:01 +0000)
commit3555af7120b9bbab05c335546a996950cedc286c
tree15e353b96330705e7b5ec80e9e9ef431faa985e0
parentc0a9b1edca4192acc6128e92cdd17a5553118745
[libc++] Do not define _LIBCPP_CLANG_VER for non-LLVM Clang

In r292833, we started defining _LIBCPP_CLANG_VER to 0 for Apple Clang.
The result is that AppleClang is detected as being a very old version
of LLVM Clang (version 0), which is obviously incorrect.

I believe this was added so that we don't have to check whether
_LIBCPP_CLANG_VER is defined prior to comparing it with a number
(which can trigger a warning). This commit also fixes the two
places that use the macro correspondingly.

llvm-svn: 368880
libcxx/include/__config