Skip to content

Commit 4be1764

Browse files
committed
[TextAPI] wrap returned Errors in std::move
1 parent 3479543 commit 4be1764

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/TextAPI/TextStubV5.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,12 @@ Expected<TargetsToSymbols> getSymbolSection(const Object *File, TBDKey Key,
404404
if (DataSection) {
405405
auto Err = collectSymbolsFromSegment(DataSection, Result, SectionFlag);
406406
if (Err)
407-
return Err;
407+
return std::move(Err);
408408
}
409409
if (TextSection) {
410410
auto Err = collectSymbolsFromSegment(TextSection, Result, SectionFlag);
411411
if (Err)
412-
return Err;
412+
return std::move(Err);
413413
}
414414
}
415415

@@ -442,7 +442,7 @@ Expected<AttrToTargets> getLibSection(const Object *File, TBDKey Key,
442442
Result[Key.str()] = MappedTargets;
443443
});
444444
if (Err)
445-
return Err;
445+
return std::move(Err);
446446
}
447447

448448
return Result;
@@ -548,7 +548,7 @@ Expected<TBDFlags> getFlags(const Object *File) {
548548
});
549549

550550
if (FlagsOrErr)
551-
return FlagsOrErr;
551+
return std::move(FlagsOrErr);
552552

553553
return Flags;
554554
}

0 commit comments

Comments
 (0)