This is an archive of the discontinued LLVM Phabricator instance.

Support: Avoid using SmallVector::set_size() in MemoryBuffer
ClosedPublic

Authored by dexonsmith on Dec 8 2021, 12:56 PM.

Details

Summary

Update getMemoryBufferForStream() to use resize_for_overwrite() and
truncate() instead of reserve() and set_size().

Blocker for https://reviews.llvm.org/D115380; depends on https://reviews.llvm.org/D115383.

Diff Detail

Event Timeline

dexonsmith created this revision.Dec 8 2021, 12:56 PM
dexonsmith requested review of this revision.Dec 8 2021, 12:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2021, 12:56 PM
dexonsmith edited the summary of this revision. (Show Details)Dec 8 2021, 12:58 PM
dexonsmith added a comment.EditedDec 8 2021, 1:23 PM

Note: I've posted follow-up patches that use this:

(edit: that was intended for a different Phab review...)

dblaikie accepted this revision.Dec 9 2021, 12:03 PM

Looks good!

This revision is now accepted and ready to land.Dec 9 2021, 12:03 PM
This revision was landed with ongoing or failed builds.Dec 9 2021, 6:45 PM
This revision was automatically updated to reflect the committed changes.