Support: assume `std::is_final` with MSVC
authorSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 1 May 2018 16:46:05 +0000 (16:46 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 1 May 2018 16:46:05 +0000 (16:46 +0000)
commit1776ea926ad579a7e8e6a9e0847160f6af25b4f0
tree38fc93fbca46ac1ef0db8a7560d4ac1fc559ad1b
parent1091ca4640810f912a58a54a57f8b165032529e8
Support: assume `std::is_final` with MSVC

According to MSDN, Visual Studio 2015 included support for
std::is_final. Additionally, a bug in the Visual Studio compiler results
in the incorrect definition of __cplusplus. Due to the conditions in the
else case not holding either, we end up with no definition of
LLVM_IS_FINAL when building with MSVC. This has not yet been a problem
with LLVM/clang, however, the uses of LLVM_IS_FINAL is more prevalent in
swift, which uses the ADT library and causes issues when building lldb
with Visual Studio.

Workaround the issue by always assuming that the definition of
std::is_final is available with Visual Studio. Since we currently
require VS 2015+ for building LLVM, this condition should always hold
for the users in LLVM/clang (and for swift).

llvm-svn: 331282
llvm/include/llvm/Support/type_traits.h