llvm.org GIT mirror llvm / d4fe2e2
Use std::is_final directly The workaround isn't needed anymore because all toolchains should support it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368910 91177308-0d34-0410-b5e6-96231b3b80d8 JF Bastien a month ago
2 changed file(s) with 1 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
248248 // because BaseTy isn't complete at class instantiation time, but
249249 // will be by the time this function is instantiated.
250250 static void verifyTrailingObjectsAssertions() {
251 #ifdef LLVM_IS_FINAL
252 static_assert(LLVM_IS_FINAL(BaseTy), "BaseTy must be final.");
253 #endif
251 static_assert(std::is_final(), "BaseTy must be final.");
254252 }
255253
256254 // These two methods are the base of the recursion for this method.
188188
189189 } // end namespace llvm
190190
191 // If the compiler supports detecting whether a class is final, define
192 // an LLVM_IS_FINAL macro. If it cannot be defined properly, this
193 // macro will be left undefined.
194 #if defined(__cplusplus) || defined(_MSC_VER)
195 #define LLVM_IS_FINAL(Ty) std::is_final()
196 #elif __has_feature(is_final) || LLVM_GNUC_PREREQ(4, 7, 0)
197 #define LLVM_IS_FINAL(Ty) __is_final(Ty)
198 #endif
199
200191 #endif // LLVM_SUPPORT_TYPE_TRAITS_H