https://github.com/lhames created 
https://github.com/llvm/llvm-project/pull/213525

These .release() calls are legacy from the std::auto_ptr to std::unique_ptr 
transition.

>From 1be0defb5bdf7039911a378f624cfebb299cf7ac Mon Sep 17 00:00:00 2001
From: Lang Hames <[email protected]>
Date: Sun, 2 Aug 2026 20:27:32 +1000
Subject: [PATCH] [lldb] std::move unique_ptrs, rather than calling .release.

These .release() calls are legacy from the std::auto_ptr to
std::unique_ptr transition.
---
 lldb/source/Expression/IRExecutionUnit.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lldb/source/Expression/IRExecutionUnit.cpp 
b/lldb/source/Expression/IRExecutionUnit.cpp
index 49edc2cdc5462..4f18a5da94e10 100644
--- a/lldb/source/Expression/IRExecutionUnit.cpp
+++ b/lldb/source/Expression/IRExecutionUnit.cpp
@@ -50,8 +50,8 @@ 
IRExecutionUnit::IRExecutionUnit(std::unique_ptr<llvm::LLVMContext> &context_up,
                                  const lldb::TargetSP &target_sp,
                                  const SymbolContext &sym_ctx,
                                  std::vector<std::string> &cpu_features)
-    : IRMemoryMap(target_sp), m_context_up(context_up.release()),
-      m_module_up(module_up.release()), m_module(m_module_up.get()),
+    : IRMemoryMap(target_sp), m_context_up(std::move(context_up)),
+      m_module_up(std::move(module_up)), m_module(m_module_up.get()),
       m_cpu_features(cpu_features), m_name(name), m_sym_ctx(sym_ctx),
       m_did_jit(false), m_function_load_addr(LLDB_INVALID_ADDRESS),
       m_function_end_load_addr(LLDB_INVALID_ADDRESS),

_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to