[Bitstream] Remove pessimizing move

Commit 4a794d848c caused build failure with -Werror -Wpessimizing-move on the clang-ppc64-aix buildbot. This patch applies Clang's suggestion to remove `std::move`.
This commit is contained in:
Jan Svoboda 2022-02-16 08:19:06 +01:00 committed by Jan Svoboda
parent e8973dd389
commit b223e5f846
1 changed files with 6 additions and 6 deletions

View File

@ -220,9 +220,9 @@ Expected<unsigned> BitstreamCursor::readRecord(unsigned AbbrevID,
uint32_t Code = MaybeCode.get();
Expected<uint32_t> MaybeNumElts = ReadVBR(6);
if (!MaybeNumElts)
return error(("Failed to read size: " +
toString(std::move(MaybeNumElts.takeError())))
.c_str());
return error(
("Failed to read size: " + toString(MaybeNumElts.takeError()))
.c_str());
uint32_t NumElts = MaybeNumElts.get();
if (!isSizePlausible(NumElts))
return error("Size is not plausible");
@ -277,9 +277,9 @@ Expected<unsigned> BitstreamCursor::readRecord(unsigned AbbrevID,
// Array case. Read the number of elements as a vbr6.
Expected<uint32_t> MaybeNumElts = ReadVBR(6);
if (!MaybeNumElts)
return error(("Failed to read size: " +
toString(std::move(MaybeNumElts.takeError())))
.c_str());
return error(
("Failed to read size: " + toString(MaybeNumElts.takeError()))
.c_str());
uint32_t NumElts = MaybeNumElts.get();
if (!isSizePlausible(NumElts))
return error("Size is not plausible");