rsmith created this revision. rsmith added reviewers: mclow.lists, EricWF. rsmith added a subscriber: cfe-commits. rsmith set the repository for this revision to rL LLVM.
Clang would like to enable some language-version-specific functionality only if the installed C++ standard library supports it (so far, sized deallocation and aligned allocation, but more cases are expected to follow). Right now, it's hard for the Clang driver to determine which version of libc++ it's found (this is typically easy for libstdc++, since the version is right there in the path). The idea here is that the __version file is always a single-line file that simply defines the libc++ version, and Clang can determine the installed version by just reading this file. There doesn't seem to be a way to make the file contain only the version number, so it contains the relevant #define instead. Repository: rL LLVM https://reviews.llvm.org/D26044 Files: __config __version Index: __version =================================================================== --- __version +++ __version @@ -0,0 +1 @@ +#define _LIBCPP_VERSION 4000 Index: __config =================================================================== --- __config +++ __config @@ -27,7 +27,7 @@ #define _GNUC_VER 0 #endif -#define _LIBCPP_VERSION 4000 +#include <__version> #ifndef _LIBCPP_ABI_VERSION #define _LIBCPP_ABI_VERSION 1
Index: __version =================================================================== --- __version +++ __version @@ -0,0 +1 @@ +#define _LIBCPP_VERSION 4000 Index: __config =================================================================== --- __config +++ __config @@ -27,7 +27,7 @@ #define _GNUC_VER 0 #endif -#define _LIBCPP_VERSION 4000 +#include <__version> #ifndef _LIBCPP_ABI_VERSION #define _LIBCPP_ABI_VERSION 1
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits