[Lldb-commits] [lldb] 8616fad - [lldb] Avoid tautological copying of a newly created object (NFC) (#204998)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 22 05:27:28 PDT 2026
Author: Sergei Barannikov
Date: 2026-06-22T15:27:23+03:00
New Revision: 8616fad2fa5c772b7ebc254335e7c6be858a5182
URL: https://github.com/llvm/llvm-project/commit/8616fad2fa5c772b7ebc254335e7c6be858a5182
DIFF: https://github.com/llvm/llvm-project/commit/8616fad2fa5c772b7ebc254335e7c6be858a5182.diff
LOG: [lldb] Avoid tautological copying of a newly created object (NFC) (#204998)
Added:
Modified:
lldb/source/Target/Memory.cpp
Removed:
################################################################################
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,
More information about the lldb-commits
mailing list