aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI
diff options
context:
space:
mode:
authorCyndy Ishida <cyndy_ishida@apple.com>2023-02-17 16:15:12 -0800
committerCyndy Ishida <cyndy_ishida@apple.com>2023-02-17 16:16:12 -0800
commit4be17641b05df1e63fa8e069af92676f1246eb83 (patch)
treea6d93a5c4c45166d738721c57c00fd6d56296482 /llvm/lib/TextAPI
parent347954314c97f7da262afd0ff5e0a208f212d30c (diff)
downloadllvm-4be17641b05df1e63fa8e069af92676f1246eb83.zip
llvm-4be17641b05df1e63fa8e069af92676f1246eb83.tar.gz
llvm-4be17641b05df1e63fa8e069af92676f1246eb83.tar.bz2
[TextAPI] wrap returned Errors in std::move
Diffstat (limited to 'llvm/lib/TextAPI')
-rw-r--r--llvm/lib/TextAPI/TextStubV5.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/TextAPI/TextStubV5.cpp b/llvm/lib/TextAPI/TextStubV5.cpp
index 431d285..30faad5 100644
--- a/llvm/lib/TextAPI/TextStubV5.cpp
+++ b/llvm/lib/TextAPI/TextStubV5.cpp
@@ -404,12 +404,12 @@ Expected<TargetsToSymbols> getSymbolSection(const Object *File, TBDKey Key,
if (DataSection) {
auto Err = collectSymbolsFromSegment(DataSection, Result, SectionFlag);
if (Err)
- return Err;
+ return std::move(Err);
}
if (TextSection) {
auto Err = collectSymbolsFromSegment(TextSection, Result, SectionFlag);
if (Err)
- return Err;
+ return std::move(Err);
}
}
@@ -442,7 +442,7 @@ Expected<AttrToTargets> getLibSection(const Object *File, TBDKey Key,
Result[Key.str()] = MappedTargets;
});
if (Err)
- return Err;
+ return std::move(Err);
}
return Result;
@@ -548,7 +548,7 @@ Expected<TBDFlags> getFlags(const Object *File) {
});
if (FlagsOrErr)
- return FlagsOrErr;
+ return std::move(FlagsOrErr);
return Flags;
}