llvm.org GIT mirror llvm / fda9fd4
Remove std::move on return when it could prevent copy elision. Found by -Wpessimizing-move, no functional change. The APFloat and PassManager change doesn't affect codegen as returning a by-value argument will always result in a move. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236316 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 4 years ago
3 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
342342 /// copied from some other APFloat.
343343 static APFloat copySign(APFloat Value, const APFloat &Sign) {
344344 Value.copySign(Sign);
345 return std::move(Value);
345 return Value;
346346 }
347347
348348 /// @}
508508 PreservedAnalyses invalidateImpl(IRUnitT &IR, PreservedAnalyses PA) {
509509 // Short circuit for a common case of all analyses being preserved.
510510 if (PA.areAllPreserved())
511 return std::move(PA);
511 return PA;
512512
513513 if (DebugLogging)
514514 dbgs() << "Invalidating all non-preserved analyses for: "
548548 if (ResultsList.empty())
549549 AnalysisResultLists.erase(&IR);
550550
551 return std::move(PA);
551 return PA;
552552 }
553553
554554 /// \brief List of function analysis pass IDs and associated concept pointers.
6868 if (StringRef(Tag).startswith("tag:yaml.org,2002:")) {
6969 std::string Ret = "!!";
7070 Ret += StringRef(Tag).substr(18);
71 return std::move(Ret);
71 return Ret;
7272 }
7373 std::string Ret = "!<";
7474 Ret += Tag;