[llvm] fc0a18f - [ADT][NFC] Remove some redundant code

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 20:14:19 PDT 2023


Author: yuntaopan
Date: 2023-09-01T20:14:15-07:00
New Revision: fc0a18f8aa72b9cfa0fc77bf2098e97585f0162b

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

LOG: [ADT][NFC] Remove some redundant code

Some typetraits are defined twice, delete this part of the code.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D159331

Added: 
    

Modified: 
    llvm/include/llvm/ADT/STLExtras.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h
index 0d649faa7dcfec..8f9774d78bd182 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/include/llvm/ADT/STLExtras.h
@@ -1484,16 +1484,6 @@ struct on_first {
 template <int N> struct rank : rank<N - 1> {};
 template <> struct rank<0> {};
 
-/// traits class for checking whether type T is one of any of the given
-/// types in the variadic list.
-template <typename T, typename... Ts>
-using is_one_of = std::disjunction<std::is_same<T, Ts>...>;
-
-/// traits class for checking whether type T is a base class for all
-///  the given types in the variadic list.
-template <typename T, typename... Ts>
-using are_base_of = std::conjunction<std::is_base_of<T, Ts>...>;
-
 namespace detail {
 template <typename... Ts> struct Visitor;
 


        


More information about the llvm-commits mailing list