[llvm] 11af7d3 - Remove DeleteContainer* functions, now that all uses have been ported to unique_ptr

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 22:49:10 PDT 2020


Author: David Blaikie
Date: 2020-04-28T22:49:02-07:00
New Revision: 11af7d32c72de42bd41f3783b9e21cbeb90dcecc

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

LOG: Remove DeleteContainer* functions, now that all uses have been ported to unique_ptr

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 d9a1d0cce2c5..595ecbd07291 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/include/llvm/ADT/STLExtras.h
@@ -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>


        


More information about the llvm-commits mailing list