[llvm] [NFC][CGData] Use `std::move` in `lazyDeserialize` call (PR #164558)
Abhishek Kaushik via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 21 23:43:07 PDT 2025
https://github.com/abhishek-kaushik22 created https://github.com/llvm/llvm-project/pull/164558
Use `std::move` for shared_ptr in `lazyDeserialize` call to avoid extra refcount ops
>From 415879c0259be46c4bad047928e2843b6a2acf43 Mon Sep 17 00:00:00 2001
From: Abhishek Kaushik <abhishek.kaushik at intel.com>
Date: Wed, 22 Oct 2025 12:12:12 +0530
Subject: [PATCH] [NFC][CGData] Use `std::move` in `lazyDeserialize` call
Use `std::move` for shared_ptr in `lazyDeserialize` call to avoid extra refcount ops
---
llvm/lib/CGData/CodeGenDataReader.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/CGData/CodeGenDataReader.cpp b/llvm/lib/CGData/CodeGenDataReader.cpp
index b1cd939db9a4f..aeb4a4d0d4b94 100644
--- a/llvm/lib/CGData/CodeGenDataReader.cpp
+++ b/llvm/lib/CGData/CodeGenDataReader.cpp
@@ -125,7 +125,7 @@ Error IndexedCodeGenDataReader::read() {
FunctionMapRecord.setReadStableFunctionMapNames(
IndexedCodeGenDataReadFunctionMapNames);
if (IndexedCodeGenDataLazyLoading)
- FunctionMapRecord.lazyDeserialize(SharedDataBuffer,
+ FunctionMapRecord.lazyDeserialize(std::move(SharedDataBuffer),
Header.StableFunctionMapOffset);
else
FunctionMapRecord.deserialize(Ptr);
More information about the llvm-commits
mailing list