This is an archive of the discontinued LLVM Phabricator instance.

Instead of using std::copy, clear the vector first and add new elements. NFC.
ClosedPublic

Authored by ruiu on Apr 3 2018, 12:57 PM.

Event Timeline

ruiu created this revision.Apr 3 2018, 12:57 PM
pcc accepted this revision.Apr 3 2018, 1:07 PM

LGTM

This revision is now accepted and ready to land.Apr 3 2018, 1:07 PM
This revision was automatically updated to reflect the committed changes.

Out of curiosity - what was the motivation for this change? I'd expect that
copy would be faster than repeated push_back (though maybe LLVM can
optimize it to match)