[PATCH] D111581: Remove checks for old gcc versions for LLVM_ATTRIBUTE_*

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 22:47:09 PDT 2021


yrouban added inline comments.


================
Comment at: llvm/include/llvm/Support/Compiler.h:100
 /// corrected in MSVC 2019 but not MSVC 2017.
-#if __has_feature(cxx_rvalue_references) || LLVM_GNUC_PREREQ(4, 8, 1) ||       \
-    LLVM_MSC_PREREQ(1920)
+#if __has_feature(cxx_rvalue_references) || LLVM_MSC_PREREQ(1920)
 #define LLVM_HAS_RVALUE_REFERENCE_THIS 1
----------------
For gcc this change results in LLVM_HAS_RVALUE_REFERENCE_THIS set to 0.
That is because __ has_feature(x) is always 0 for gcc regardless of the version (I use 7.4.0).
//__has_feature// is not and will not be defined for gcc. (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60512). Please consider fixing or reverting this patch.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111581/new/

https://reviews.llvm.org/D111581



More information about the llvm-commits mailing list