[Lldb-commits] [lldb] [lldb] Avoid tautological copying of a newly created object (PR #204998)
via lldb-commits
lldb-commits at lists.llvm.org
Sun Jun 21 11:14:23 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Sergei Barannikov (s-barannikov)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/204998.diff
1 Files Affected:
- (modified) lldb/source/Target/Memory.cpp (+1-2)
``````````diff
diff --git a/lldb/source/Target/Memory.cpp b/lldb/source/Target/Memory.cpp
index 3684d9410b64a..f70da27ec058b 100644
--- a/lldb/source/Target/Memory.cpp
+++ b/lldb/source/Target/Memory.cpp
@@ -42,8 +42,7 @@ void MemoryCache::Clear(bool clear_invalid_ranges) {
void MemoryCache::AddL1CacheData(lldb::addr_t addr, const void *src,
size_t src_len) {
- AddL1CacheData(
- addr, DataBufferSP(new DataBufferHeap(DataBufferHeap(src, src_len))));
+ AddL1CacheData(addr, std::make_shared<DataBufferHeap>(src, src_len));
}
void MemoryCache::AddL1CacheData(lldb::addr_t addr,
``````````
</details>
https://github.com/llvm/llvm-project/pull/204998
More information about the lldb-commits
mailing list