]> granicus.if.org Git - llvm/commitdiff
Un-break the bots
authorJF Bastien <jfbastien@apple.com>
Wed, 14 Aug 2019 18:17:06 +0000 (18:17 +0000)
committerJF Bastien <jfbastien@apple.com>
Wed, 14 Aug 2019 18:17:06 +0000 (18:17 +0000)
Some bots can't find is_final despite it being in C++14. Leave the code as it was for now, fix it later when the bots are happy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368896 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/type_traits.h

index 403bac7260bdcaf7e0d265833f5806bc4589ef38..b580f25fd18f5b2261fb789336092c7deba0c124 100644 (file)
@@ -192,7 +192,10 @@ class is_trivially_copyable<T*> : public std::true_type {
 // If the compiler supports detecting whether a class is final, define
 // an LLVM_IS_FINAL macro. If it cannot be defined properly, this
 // macro will be left undefined.
-#if defined(__cplusplus) || defined(_MSC_VER)
+//
+// FIXME we should just use std::is_final directly, but some bots are currently
+// broken.
+#if __cplusplus >= 201402L || defined(_MSC_VER)
 #define LLVM_IS_FINAL(Ty) std::is_final<Ty>()
 #elif __has_feature(is_final) || LLVM_GNUC_PREREQ(4, 7, 0)
 #define LLVM_IS_FINAL(Ty) __is_final(Ty)