aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ObjectYAML
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2020-02-10 05:18:09 -0800
committerBill Wendling <isanbard@gmail.com>2020-02-10 06:39:44 -0800
commit1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2 (patch)
tree0c9ba27cfe58de2aedf223cced3864d1d2e92fef /llvm/lib/ObjectYAML
parenta67db83681f3dfe2950ad8d2b2addb5d6f175ad3 (diff)
downloadllvm-1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2.zip
llvm-1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2.tar.gz
llvm-1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2.tar.bz2
Remove redundant "std::move"s in return statements
Diffstat (limited to 'llvm/lib/ObjectYAML')
-rw-r--r--llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp10
-rw-r--r--llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp2
-rw-r--r--llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp2
-rw-r--r--llvm/lib/ObjectYAML/DWARFEmitter.cpp2
4 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp b/llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
index 02f053b..6584341 100644
--- a/llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
+++ b/llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
@@ -694,11 +694,11 @@ YAMLStringTableSubsection::fromCodeViewSubsection(
StringRef S;
// First item is a single null string, skip it.
if (auto EC = Reader.readCString(S))
- return std::move(EC);
+ return EC;
assert(S.empty());
while (Reader.bytesRemaining() > 0) {
if (auto EC = Reader.readCString(S))
- return std::move(EC);
+ return EC;
Result->Strings.push_back(S);
}
return Result;
@@ -749,7 +749,7 @@ llvm::CodeViewYAML::toCodeViewSubsectionList(
const codeview::StringsAndChecksums &SC) {
std::vector<std::shared_ptr<DebugSubsection>> Result;
if (Subsections.empty())
- return std::move(Result);
+ return Result;
for (const auto &SS : Subsections) {
std::shared_ptr<DebugSubsection> CVS;
@@ -757,7 +757,7 @@ llvm::CodeViewYAML::toCodeViewSubsectionList(
assert(CVS != nullptr);
Result.push_back(std::move(CVS));
}
- return std::move(Result);
+ return Result;
}
namespace {
@@ -892,7 +892,7 @@ YAMLDebugSubsection::fromCodeViewSubection(const StringsAndChecksumsRef &SC,
const DebugSubsectionRecord &SS) {
SubsectionConversionVisitor V;
if (auto EC = visitDebugSubsection(SS, V, SC))
- return std::move(EC);
+ return EC;
return V.Subsection;
}
diff --git a/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp b/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
index 95409fd..094e298 100644
--- a/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
+++ b/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
@@ -585,7 +585,7 @@ fromCodeViewSymbolImpl(CVSymbol Symbol) {
auto Impl = std::make_shared<SymbolType>(Symbol.kind());
if (auto EC = Impl->fromCodeViewSymbol(Symbol))
- return std::move(EC);
+ return EC;
Result.Symbol = Impl;
return Result;
}
diff --git a/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp b/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp
index a5e3ce1..a830e829 100644
--- a/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp
+++ b/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp
@@ -671,7 +671,7 @@ static inline Expected<LeafRecord> fromCodeViewRecordImpl(CVType Type) {
auto Impl = std::make_shared<LeafRecordImpl<T>>(Type.kind());
if (auto EC = Impl->fromCodeViewRecord(Type))
- return std::move(EC);
+ return EC;
Result.Leaf = Impl;
return Result;
}
diff --git a/llvm/lib/ObjectYAML/DWARFEmitter.cpp b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
index b410fed..db99ad9 100644
--- a/llvm/lib/ObjectYAML/DWARFEmitter.cpp
+++ b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
@@ -377,5 +377,5 @@ DWARFYAML::EmitDebugSections(StringRef YAMLString, bool ApplyFixups,
DebugSections);
EmitDebugSectionImpl(DI, &DWARFYAML::EmitDebugAranges, "debug_aranges",
DebugSections);
- return std::move(DebugSections);
+ return DebugSections;
}