[llvm] 60605a2 - Set LLVM_HAS_RVALUE_REFERENCE_THIS when __GNUC__ is defined

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 23:17:23 PDT 2021


Author: Arthur Eubanks
Date: 2021-10-13T23:13:55-07:00
New Revision: 60605a2b8fa2a1364803971e83ac829957298d40

URL: https://github.com/llvm/llvm-project/commit/60605a2b8fa2a1364803971e83ac829957298d40
DIFF: https://github.com/llvm/llvm-project/commit/60605a2b8fa2a1364803971e83ac829957298d40.diff

LOG: Set LLVM_HAS_RVALUE_REFERENCE_THIS when __GNUC__ is defined

gcc does not support __has_feature(), so this was accidentally changed
in D111581 when compiling with gcc.

Added: 
    

Modified: 
    llvm/include/llvm/Support/Compiler.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index dbc37b20f87e8..3aa76546fd1d2 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/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_MSC_PREREQ(1920)
+#if __has_feature(cxx_rvalue_references) || defined(__GNUC__) ||               \
+    LLVM_MSC_PREREQ(1920)
 #define LLVM_HAS_RVALUE_REFERENCE_THIS 1
 #else
 #define LLVM_HAS_RVALUE_REFERENCE_THIS 0


        


More information about the llvm-commits mailing list