This is an archive of the discontinued LLVM Phabricator instance.

Defaultify copy and move constructors for StreamRefs
ClosedPublic

Authored by alex.telishev on Aug 20 2017, 1:53 PM.

Details

Summary

Only copy constructor was present for BinaryStreamRefBase and BinaryStreamRef resulting in move constructor being deleted. BinaryStreamRefBase contains std::shared_ptr that is quite expensive to copy and cheap to move. BinaryStreamRef is moved quite often (as it's used as return type of many functions).

Diff Detail

Repository
rL LLVM

Event Timeline

alex.telishev created this revision.Aug 20 2017, 1:53 PM
zturner accepted this revision.Aug 21 2017, 10:37 AM

lgtm, thanks! I'll commit this on your behalf.

This revision is now accepted and ready to land.Aug 21 2017, 10:37 AM
This revision was automatically updated to reflect the committed changes.