Skip to content

Commit b223e5f

Browse files
committed
[Bitstream] Remove pessimizing move
Commit 4a794d8 caused build failure with -Werror -Wpessimizing-move on the clang-ppc64-aix buildbot. This patch applies Clang's suggestion to remove `std::move`.
1 parent e8973dd commit b223e5f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/Bitstream/Reader/BitstreamReader.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ Expected<unsigned> BitstreamCursor::readRecord(unsigned AbbrevID,
220220
uint32_t Code = MaybeCode.get();
221221
Expected<uint32_t> MaybeNumElts = ReadVBR(6);
222222
if (!MaybeNumElts)
223-
return error(("Failed to read size: " +
224-
toString(std::move(MaybeNumElts.takeError())))
225-
.c_str());
223+
return error(
224+
("Failed to read size: " + toString(MaybeNumElts.takeError()))
225+
.c_str());
226226
uint32_t NumElts = MaybeNumElts.get();
227227
if (!isSizePlausible(NumElts))
228228
return error("Size is not plausible");
@@ -277,9 +277,9 @@ Expected<unsigned> BitstreamCursor::readRecord(unsigned AbbrevID,
277277
// Array case. Read the number of elements as a vbr6.
278278
Expected<uint32_t> MaybeNumElts = ReadVBR(6);
279279
if (!MaybeNumElts)
280-
return error(("Failed to read size: " +
281-
toString(std::move(MaybeNumElts.takeError())))
282-
.c_str());
280+
return error(
281+
("Failed to read size: " + toString(MaybeNumElts.takeError()))
282+
.c_str());
283283
uint32_t NumElts = MaybeNumElts.get();
284284
if (!isSizePlausible(NumElts))
285285
return error("Size is not plausible");

0 commit comments

Comments
 (0)