aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorChris Cotter <ccotter14@bloomberg.net>2023-02-01 17:38:30 +0000
committerMichael Buch <michaelbuch12@gmail.com>2023-02-01 17:40:27 +0000
commit6e3d12951dd7d3305f0e33e0aa4038cbd82f245a (patch)
tree4012c631f0fde63b71f75aa07b5e45c74ffaaa68 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parent08032411301e8996879c4b558b8bb3808d5dfe6f (diff)
downloadllvm-6e3d12951dd7d3305f0e33e0aa4038cbd82f245a.zip
llvm-6e3d12951dd7d3305f0e33e0aa4038cbd82f245a.tar.gz
llvm-6e3d12951dd7d3305f0e33e0aa4038cbd82f245a.tar.bz2
[llvm][NFC] Use move instead of copy
Summary: For functions that accept an rvalue reference type parameter, use move to avoid copying the parameter. These were found when implementing CppCoreGuideline F.18 in clang-tidy. Committed on behalf of ccotter (Chris Cotter) Reviewers: Michael137 thieta Differential Revision: https://reviews.llvm.org/D142825
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index 0a67c4b..de050cd 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -488,10 +488,10 @@ void CodeViewDebug::recordLocalVariable(LocalVariable &&Var,
// This variable was inlined. Associate it with the InlineSite.
const DISubprogram *Inlinee = Var.DIVar->getScope()->getSubprogram();
InlineSite &Site = getInlineSite(InlinedAt, Inlinee);
- Site.InlinedLocals.emplace_back(Var);
+ Site.InlinedLocals.emplace_back(std::move(Var));
} else {
// This variable goes into the corresponding lexical scope.
- ScopeVariables[LS].emplace_back(Var);
+ ScopeVariables[LS].emplace_back(std::move(Var));
}
}