1 //===- lld/Core/STDExtra.h - Helpers for the stdlib -----------------------===//
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLD_CORE_STD_EXTRA_H
11 #define LLD_CORE_STD_EXTRA_H
14 /// \brief Deleter for smart pointers that only calls the destructor. Memory is
15 /// managed elsewhere. A common use of this is for things allocated with a
18 struct destruct_delete {
19 void operator ()(T *ptr) {
25 using unique_bump_ptr = std::unique_ptr<T, destruct_delete<T>>;
27 } // end namespace lld