[llvm] 6003a44 - [NFC][CGData] Use `std::move` in `lazyDeserialize` call (#164558)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 23 02:56:26 PDT 2025
Author: Abhishek Kaushik
Date: 2025-10-23T15:26:22+05:30
New Revision: 6003a448b3998c720fe87f0f4d8f263ebe9ae2ee
URL: https://github.com/llvm/llvm-project/commit/6003a448b3998c720fe87f0f4d8f263ebe9ae2ee
DIFF: https://github.com/llvm/llvm-project/commit/6003a448b3998c720fe87f0f4d8f263ebe9ae2ee.diff
LOG: [NFC][CGData] Use `std::move` in `lazyDeserialize` call (#164558)
Use `std::move` for shared_ptr in `lazyDeserialize` call to avoid extra
refcount ops
Added:
Modified:
llvm/lib/CGData/CodeGenDataReader.cpp
Removed:
################################################################################
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