Remove DeleteContainer* functions, now that all uses have been ported to unique_ptr
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 29 Apr 2020 05:39:30 +0000 (22:39 -0700)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 29 Apr 2020 05:49:02 +0000 (22:49 -0700)
llvm/include/llvm/ADT/STLExtras.h

index d9a1d0c..595ecbd 100644 (file)
@@ -1450,24 +1450,6 @@ inline void sort(Container &&C, Compare Comp) {
 //     Extra additions to <algorithm>
 //===----------------------------------------------------------------------===//
 
-/// For a container of pointers, deletes the pointers and then clears the
-/// container.
-template<typename Container>
-void DeleteContainerPointers(Container &C) {
-  for (auto V : C)
-    delete V;
-  C.clear();
-}
-
-/// In a container of pairs (usually a map) whose second element is a pointer,
-/// deletes the second elements and then clears the container.
-template<typename Container>
-void DeleteContainerSeconds(Container &C) {
-  for (auto &V : C)
-    delete V.second;
-  C.clear();
-}
-
 /// Get the size of a range. This is a wrapper function around std::distance
 /// which is only enabled when the operation is O(1).
 template <typename R>