forked from OSchip/llvm-project
[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:
parent
e8973dd389
commit
b223e5f846
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue