Skip to content

Commit

Permalink
Remove pessimizing std::move
Browse files Browse the repository at this point in the history
Summary:
This is part of a series of clean-up patches to make bolt
cleanly compile with clang 4.0. This patch fixes the following warning:
moving a temporary object prevents copy elision

(cherry picked from FBD4242236)
  • Loading branch information
rafaelauler authored and maksfb committed Nov 29, 2016
1 parent 7115706 commit b21bc02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bolt/BinaryPasses.cpp
Expand Up @@ -514,7 +514,7 @@ InlineSmallFunctions::inlineCall(
// instructions in the last block of the inlined instance.
// (Is it OK to have a basic block with just CFI instructions?)
std::vector<MCInst> TrailInstructions =
std::move(CallerBB->splitInstructions(&CallInst));
CallerBB->splitInstructions(&CallInst);
assert(TrailInstructions.size() > 0);
InlinedInstance.back()->addInstructions(
TrailInstructions.begin(),
Expand Down

0 comments on commit b21bc02

Please sign in to comment.