[llvm] r225059 - Just use a using directive in SmallMapVector instead of inheriting from MapVector itself.

Michael Gottesman mgottesman at apple.com
Thu Jan 1 00:05:42 PST 2015


Author: mgottesman
Date: Thu Jan  1 02:05:41 2015
New Revision: 225059

URL: http://llvm.org/viewvc/llvm-project?rev=225059&view=rev
Log:
Just use a using directive in SmallMapVector instead of inheriting from MapVector itself.

Modified:
    llvm/trunk/include/llvm/ADT/MapVector.h

Modified: llvm/trunk/include/llvm/ADT/MapVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/MapVector.h?rev=225059&r1=225058&r2=225059&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/MapVector.h (original)
+++ llvm/trunk/include/llvm/ADT/MapVector.h Thu Jan  1 02:05:41 2015
@@ -185,12 +185,9 @@ void MapVector<KeyT, ValueT, MapType, Ve
 /// \brief A MapVector that performs no allocations if smaller than a certain
 /// size.
 template <typename KeyT, typename ValueT, unsigned N>
-class SmallMapVector
-    : public MapVector<KeyT, ValueT, SmallDenseMap<KeyT, unsigned, N>,
-                       SmallVector<std::pair<KeyT, ValueT>, N>> {
-public:
-  SmallMapVector() {}
-};
+using SmallMapVector =
+  MapVector<KeyT, ValueT, SmallDenseMap<KeyT, unsigned, N>,
+            SmallVector<std::pair<KeyT, ValueT>, N>>;
 
 } // end namespace llvm
 





More information about the llvm-commits mailing list