[PATCH] D98809: [NFC] Enable RVALUE_REFERENCE_THIS on MSVC 2019
Nathan James via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 17 13:15:28 PDT 2021
njames93 created this revision.
njames93 added reviewers: thakis, aaron.ballman, dblaikie.
Herald added a subscriber: dexonsmith.
njames93 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
In https://reviews.llvm.org/D72948 This was enabled for all MSVC but reverted as it was determined not to work on some 2017 versions.
The issue is assumed to be fixed on 2019 so enable for 2019 and newer.
Some testing could be done to determine which version of MSVC 2017 support this feature but its safer right now to leave it at 2019.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D98809
Files:
llvm/include/llvm/Support/Compiler.h
Index: llvm/include/llvm/Support/Compiler.h
===================================================================
--- llvm/include/llvm/Support/Compiler.h
+++ llvm/include/llvm/Support/Compiler.h
@@ -97,7 +97,8 @@
/// Sadly, this is separate from just rvalue reference support because GCC
/// and MSVC implemented this later than everything else. This appears to be
/// corrected in MSVC 2019 but not MSVC 2017.
-#if __has_feature(cxx_rvalue_references) || LLVM_GNUC_PREREQ(4, 8, 1)
+#if __has_feature(cxx_rvalue_references) || LLVM_GNUC_PREREQ(4, 8, 1) || \
+ LLVM_MSC_PREREQ(1920)
#define LLVM_HAS_RVALUE_REFERENCE_THIS 1
#else
#define LLVM_HAS_RVALUE_REFERENCE_THIS 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98809.331352.patch
Type: text/x-patch
Size: 684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210317/801fd7df/attachment.bin>
More information about the llvm-commits
mailing list