//===-- Utils.h -------------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLDB_API_UTILS_H #define LLDB_API_UTILS_H #include "llvm/ADT/STLExtras.h" #include namespace lldb_private { template std::unique_ptr clone(const std::unique_ptr &src) { if (src) return std::make_unique(*src); return nullptr; } template std::shared_ptr clone(const std::shared_ptr &src) { if (src) return std::make_shared(*src); return nullptr; } } // namespace lldb_private #endif