This is an archive of the discontinued LLVM Phabricator instance.

Support: assume `std::is_final` with MSVC
ClosedPublic

Authored by compnerd on Apr 26 2018, 5:58 PM.

Details

Reviewers
rnk
Summary

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).

Diff Detail

Repository
rL LLVM

Event Timeline

compnerd created this revision.Apr 26 2018, 5:58 PM

This looks fine to me. I just dropped in to add some context on MSVC and __cplusplus: https://blogs.msdn.microsoft.com/vcblog/2018/04/09/msvc-now-correctly-reports-__cplusplus/

rnk accepted this revision.Apr 27 2018, 2:16 PM
This revision is now accepted and ready to land.Apr 27 2018, 2:16 PM
compnerd closed this revision.May 1 2018, 9:49 AM

SVN r331282