mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
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. llvm-svn: 236316
This commit is contained in:
parent
f00cf4968b
commit
486636e5e7
@ -343,7 +343,7 @@ public:
|
||||
/// copied from some other APFloat.
|
||||
static APFloat copySign(APFloat Value, const APFloat &Sign) {
|
||||
Value.copySign(Sign);
|
||||
return std::move(Value);
|
||||
return Value;
|
||||
}
|
||||
|
||||
/// @}
|
||||
|
@ -509,7 +509,7 @@ private:
|
||||
PreservedAnalyses invalidateImpl(IRUnitT &IR, PreservedAnalyses PA) {
|
||||
// Short circuit for a common case of all analyses being preserved.
|
||||
if (PA.areAllPreserved())
|
||||
return std::move(PA);
|
||||
return PA;
|
||||
|
||||
if (DebugLogging)
|
||||
dbgs() << "Invalidating all non-preserved analyses for: "
|
||||
@ -549,7 +549,7 @@ private:
|
||||
if (ResultsList.empty())
|
||||
AnalysisResultLists.erase(&IR);
|
||||
|
||||
return std::move(PA);
|
||||
return PA;
|
||||
}
|
||||
|
||||
/// \brief List of function analysis pass IDs and associated concept pointers.
|
||||
|
@ -69,7 +69,7 @@ static std::string prettyTag(yaml::Node *N) {
|
||||
if (StringRef(Tag).startswith("tag:yaml.org,2002:")) {
|
||||
std::string Ret = "!!";
|
||||
Ret += StringRef(Tag).substr(18);
|
||||
return std::move(Ret);
|
||||
return Ret;
|
||||
}
|
||||
std::string Ret = "!<";
|
||||
Ret += Tag;
|
||||
|
Loading…
Reference in New Issue
Block a user