From 6ae37961a8d8538d254e4e4aa1dc60026fe381a2 Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Thu, 30 Apr 2015 23:07:00 +0000 Subject: [PATCH] Fix -Wpessimizing-move warnings by removing std::move calls. llvm-svn: 236278 --- llvm/lib/Analysis/LoopInfo.cpp | 2 +- llvm/lib/Support/APFloat.cpp | 4 ++-- llvm/tools/lli/OrcLazyJIT.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp index 6462b0670ffe..b3a33326c00a 100644 --- a/llvm/lib/Analysis/LoopInfo.cpp +++ b/llvm/lib/Analysis/LoopInfo.cpp @@ -680,7 +680,7 @@ LoopInfo LoopAnalysis::run(Function &F, AnalysisManager *AM) { // the problem is better understood. LoopInfo LI; LI.Analyze(AM->getResult(F)); - return std::move(LI); + return LI; } PreservedAnalyses LoopPrinterPass::run(Function &F, diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index 5a402bb28045..4b0a0e5d4819 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/lib/Support/APFloat.cpp @@ -3920,7 +3920,7 @@ APFloat::makeZero(bool Negative) { APFloat llvm::scalbn(APFloat X, int Exp) { if (X.isInfinity() || X.isZero() || X.isNaN()) - return std::move(X); + return X; auto MaxExp = X.getSemantics().maxExponent; auto MinExp = X.getSemantics().minExponent; @@ -3932,5 +3932,5 @@ APFloat llvm::scalbn(APFloat X, int Exp) { return APFloat::getZero(X.getSemantics(), X.isNegative()); X.exponent += Exp; - return std::move(X); + return X; } diff --git a/llvm/tools/lli/OrcLazyJIT.cpp b/llvm/tools/lli/OrcLazyJIT.cpp index 88904e0af8e2..bda5d6dcd26c 100644 --- a/llvm/tools/lli/OrcLazyJIT.cpp +++ b/llvm/tools/lli/OrcLazyJIT.cpp @@ -62,7 +62,7 @@ OrcLazyJIT::TransformFtor OrcLazyJIT::createDebugDumper() { switch (OrcDumpKind) { case DumpKind::NoDump: - return [](std::unique_ptr M) { return std::move(M); }; + return [](std::unique_ptr M) { return M; }; case DumpKind::DumpFuncsToStdOut: return [](std::unique_ptr M) { @@ -80,7 +80,7 @@ OrcLazyJIT::TransformFtor OrcLazyJIT::createDebugDumper() { } printf("]\n"); - return std::move(M); + return M; }; case DumpKind::DumpModsToStdErr: @@ -88,7 +88,7 @@ OrcLazyJIT::TransformFtor OrcLazyJIT::createDebugDumper() { dbgs() << "----- Module Start -----\n" << *M << "----- Module End -----\n"; - return std::move(M); + return M; }; case DumpKind::DumpModsToDisk: @@ -102,7 +102,7 @@ OrcLazyJIT::TransformFtor OrcLazyJIT::createDebugDumper() { exit(1); } Out << *M; - return std::move(M); + return M; }; } llvm_unreachable("Unknown DumpKind");