Replace a reserve()/set_size() pair with resize_for_overwrite()
and truncate(). The out parameter also needs a clear() call on the
error path.
Depends on https://reviews.llvm.org/D115383 or successor; blocker for https://reviews.llvm.org/D115380.
Paths
| Differential D115389
Support: Avoid SmallVector::set_size() in Unix code ClosedPublic Authored by dexonsmith on Dec 8 2021, 1:06 PM.
Details Summary Replace a reserve()/set_size() pair with resize_for_overwrite() Depends on https://reviews.llvm.org/D115383 or successor; blocker for https://reviews.llvm.org/D115380.
Diff Detail Event Timelinedexonsmith added a parent revision: D115383: ADT: Add SmallVectorImpl::truncate() to replace uses of set_size().Dec 8 2021, 1:07 PM Comment Actions Adding a couple of potential reviewers. [No change in diff; just retrigging CI after a spurious failure.] This revision is now accepted and ready to land.Dec 9 2021, 2:47 AM Closed by commit rGb0492d92adc5: Support: Avoid SmallVector::set_size() in Unix code (authored by dexonsmith). · Explain WhyJan 11 2022, 6:00 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 392976 llvm/lib/Support/Unix/Path.inc
|