This is an archive of the discontinued LLVM Phabricator instance.

ContentCache: Simplify by always owning the MemoryBuffer
ClosedPublic

Authored by dexonsmith on Aug 30 2019, 5:38 PM.

Details

Summary

This changes ContentCache::Buffer to use
std::unique_ptr<MemoryBuffer> instead of the PointerIntPair. It
drops the (mostly unused) DoNotFree bit, instead creating a (new)
non-owning MemoryBuffer instance when passed a MemoryBufferRef.

Diff Detail

Event Timeline

dexonsmith created this revision.Aug 30 2019, 5:38 PM

ping: Besides rebasing, any concerns here?

dexonsmith edited the summary of this revision. (Show Details)

Rebased on top of https://reviews.llvm.org/D89431 (the tests haven't finished yet; I'll update if necessary, but this is pretty straightforward).

ping

Rebased on top of https://reviews.llvm.org/D89431 (the tests haven't finished yet; I'll update if necessary, but this is pretty straightforward).

(FTR, the tests passed as expected.)

arphaman accepted this revision.Oct 20 2020, 3:22 PM
This revision is now accepted and ready to land.Oct 20 2020, 3:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 20 2020, 6:04 PM