[llvm] 25203e7 - [ADT] Delete unused llvm::pointer_union_detail::AssignableFrom

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 09:24:44 PDT 2020


Author: Fangrui Song
Date: 2020-07-22T09:24:36-07:00
New Revision: 25203e7e3e619af2ae890f2ad0dd9812dd9b4b7f

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

LOG: [ADT] Delete unused llvm::pointer_union_detail::AssignableFrom

Noticed by Zhiwei Chen

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/PointerUnion.h b/llvm/include/llvm/ADT/PointerUnion.h
index 6fecff8d756f..c39691061b72 100644
--- a/llvm/include/llvm/ADT/PointerUnion.h
+++ b/llvm/include/llvm/ADT/PointerUnion.h
@@ -93,13 +93,6 @@ namespace pointer_union_detail {
     static constexpr int NumLowBitsAvailable = lowBitsAvailable<PTs...>();
   };
 
-  /// Implement assignment in terms of construction.
-  template <typename Derived, typename T> struct AssignableFrom {
-    Derived &operator=(T t) {
-      return static_cast<Derived &>(*this) = Derived(t);
-    }
-  };
-
   template <typename Derived, typename ValTy, int I, typename ...Types>
   class PointerUnionMembers;
 


        


More information about the llvm-commits mailing list