Apply clang-tidy's misc-move-constructor-init throughout LLVM.
No functionality change intended, maybe a tiny performance improvement.
llvm-svn: 270997
diff --git a/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h b/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
index d4756f7..237d541 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
+++ b/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
@@ -16,6 +16,7 @@
#include "llvm/IR/DebugLoc.h"
#include "llvm/Support/DataTypes.h"
+#include <utility>
namespace llvm {
@@ -55,7 +56,8 @@
// Constructor for non-constants.
SDDbgValue(MDNode *Var, MDNode *Expr, SDNode *N, unsigned R, bool indir,
uint64_t off, DebugLoc dl, unsigned O)
- : Var(Var), Expr(Expr), Offset(off), DL(dl), Order(O), IsIndirect(indir) {
+ : Var(Var), Expr(Expr), Offset(off), DL(std::move(dl)), Order(O),
+ IsIndirect(indir) {
kind = SDNODE;
u.s.Node = N;
u.s.ResNo = R;
@@ -64,7 +66,8 @@
// Constructor for constants.
SDDbgValue(MDNode *Var, MDNode *Expr, const Value *C, uint64_t off,
DebugLoc dl, unsigned O)
- : Var(Var), Expr(Expr), Offset(off), DL(dl), Order(O), IsIndirect(false) {
+ : Var(Var), Expr(Expr), Offset(off), DL(std::move(dl)), Order(O),
+ IsIndirect(false) {
kind = CONST;
u.Const = C;
}
@@ -72,7 +75,8 @@
// Constructor for frame indices.
SDDbgValue(MDNode *Var, MDNode *Expr, unsigned FI, uint64_t off, DebugLoc dl,
unsigned O)
- : Var(Var), Expr(Expr), Offset(off), DL(dl), Order(O), IsIndirect(false) {
+ : Var(Var), Expr(Expr), Offset(off), DL(std::move(dl)), Order(O),
+ IsIndirect(false) {
kind = FRAMEIX;
u.FrameIx = FI;
}