[llvm] 2163ae7 - [LVStringPool] Remove incorrect std::move (NFCI)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun May 12 21:54:46 PDT 2024
Author: Nikita Popov
Date: 2024-05-13T13:54:37+09:00
New Revision: 2163ae761808ca0e5478357384f6ddbacce279eb
URL: https://github.com/llvm/llvm-project/commit/2163ae761808ca0e5478357384f6ddbacce279eb
DIFF: https://github.com/llvm/llvm-project/commit/2163ae761808ca0e5478357384f6ddbacce279eb.diff
LOG: [LVStringPool] Remove incorrect std::move (NFCI)
"Value" is still used afterwards in the return value. In this case,
this doesn't actually make a difference because a move for a
primitive type is the same as a copy, so there is no actual
misbehavior. Still drop the std::move to make the code less
confusing.
Added:
Modified:
llvm/include/llvm/DebugInfo/LogicalView/Core/LVStringPool.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/DebugInfo/LogicalView/Core/LVStringPool.h b/llvm/include/llvm/DebugInfo/LogicalView/Core/LVStringPool.h
index 4c596b5b1dde7..8ce751a56c590 100644
--- a/llvm/include/llvm/DebugInfo/LogicalView/Core/LVStringPool.h
+++ b/llvm/include/llvm/DebugInfo/LogicalView/Core/LVStringPool.h
@@ -60,7 +60,7 @@ class LVStringPool {
if (isValidIndex(Index))
return Index;
size_t Value = Entries.size();
- ValueType *Entry = ValueType::create(Key, Allocator, std::move(Value));
+ ValueType *Entry = ValueType::create(Key, Allocator, Value);
StringTable.insert(Entry);
Entries.push_back(Entry);
return Value;
More information about the llvm-commits
mailing list