[Orc] Remove the FPRPCChannel class from RPCChannel.h - it requires unistd.h,
[oota-llvm.git] / include / llvm / ADT / MapVector.h
index b10db611484af53a091fa219102e37e335b2f010..f19a50b7ba8450cce8c0d2c630abf220fdd170c6 100644 (file)
@@ -67,6 +67,11 @@ public:
     Vector.clear();
   }
 
+  void swap(MapVector &RHS) {
+    std::swap(Map, RHS.Map);
+    std::swap(Vector, RHS.Vector);
+  }
+
   ValueT &operator[](const KeyT &Key) {
     std::pair<KeyT, unsigned> Pair = std::make_pair(Key, 0);
     std::pair<typename MapType::iterator, bool> Result = Map.insert(Pair);
@@ -185,9 +190,10 @@ void MapVector<KeyT, ValueT, MapType, VectorType>::remove_if(Function Pred) {
 /// \brief A MapVector that performs no allocations if smaller than a certain
 /// size.
 template <typename KeyT, typename ValueT, unsigned N>
-using SmallMapVector =
-  MapVector<KeyT, ValueT, SmallDenseMap<KeyT, unsigned, N>,
-            SmallVector<std::pair<KeyT, ValueT>, N>>;
+struct SmallMapVector
+    : MapVector<KeyT, ValueT, SmallDenseMap<KeyT, unsigned, N>,
+                SmallVector<std::pair<KeyT, ValueT>, N>> {
+};
 
 } // end namespace llvm