[llvm] r236278 - Fix -Wpessimizing-move warnings by removing std::move calls.
Richard Trieu
rtrieu at google.com
Thu Apr 30 16:07:00 PDT 2015
Author: rtrieu
Date: Thu Apr 30 18:07:00 2015
New Revision: 236278
URL: http://llvm.org/viewvc/llvm-project?rev=236278&view=rev
Log:
Fix -Wpessimizing-move warnings by removing std::move calls.
Modified:
llvm/trunk/lib/Analysis/LoopInfo.cpp
llvm/trunk/lib/Support/APFloat.cpp
llvm/trunk/tools/lli/OrcLazyJIT.cpp
Modified: llvm/trunk/lib/Analysis/LoopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopInfo.cpp?rev=236278&r1=236277&r2=236278&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopInfo.cpp Thu Apr 30 18:07:00 2015
@@ -680,7 +680,7 @@ LoopInfo LoopAnalysis::run(Function &F,
// the problem is better understood.
LoopInfo LI;
LI.Analyze(AM->getResult<DominatorTreeAnalysis>(F));
- return std::move(LI);
+ return LI;
}
PreservedAnalyses LoopPrinterPass::run(Function &F,
Modified: llvm/trunk/lib/Support/APFloat.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=236278&r1=236277&r2=236278&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APFloat.cpp (original)
+++ llvm/trunk/lib/Support/APFloat.cpp Thu Apr 30 18:07:00 2015
@@ -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;
}
Modified: llvm/trunk/tools/lli/OrcLazyJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/OrcLazyJIT.cpp?rev=236278&r1=236277&r2=236278&view=diff
==============================================================================
--- llvm/trunk/tools/lli/OrcLazyJIT.cpp (original)
+++ llvm/trunk/tools/lli/OrcLazyJIT.cpp Thu Apr 30 18:07:00 2015
@@ -62,7 +62,7 @@ OrcLazyJIT::TransformFtor OrcLazyJIT::cr
switch (OrcDumpKind) {
case DumpKind::NoDump:
- return [](std::unique_ptr<Module> M) { return std::move(M); };
+ return [](std::unique_ptr<Module> M) { return M; };
case DumpKind::DumpFuncsToStdOut:
return [](std::unique_ptr<Module> M) {
@@ -80,7 +80,7 @@ OrcLazyJIT::TransformFtor OrcLazyJIT::cr
}
printf("]\n");
- return std::move(M);
+ return M;
};
case DumpKind::DumpModsToStdErr:
@@ -88,7 +88,7 @@ OrcLazyJIT::TransformFtor OrcLazyJIT::cr
dbgs() << "----- Module Start -----\n" << *M
<< "----- Module End -----\n";
- return std::move(M);
+ return M;
};
case DumpKind::DumpModsToDisk:
@@ -102,7 +102,7 @@ OrcLazyJIT::TransformFtor OrcLazyJIT::cr
exit(1);
}
Out << *M;
- return std::move(M);
+ return M;
};
}
llvm_unreachable("Unknown DumpKind");
More information about the llvm-commits
mailing list