[PATCH] D59388: Basic: Return a reference from FileManager::getVirtualFileSystem, NFC
Jan Korous via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 19 11:28:08 PDT 2019
jkorous accepted this revision.
jkorous added a comment.
This revision is now accepted and ready to land.
In D59388#1433233 <https://reviews.llvm.org/D59388#1433233>, @dexonsmith wrote:
> Yes, it's safe. The reference count is "intrusive", meaning it's stored in the object itself (via inheritance from `RefCountedBase`). As a result, all the instances of `IntrusiveRefCntPtr` that reference at the same object will implicitly share their count.
I missed that `llvm::vfs::FileSystem` inherits from `ThreadSafeRefCountedBase`.
LGTM.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59388/new/
https://reviews.llvm.org/D59388
More information about the cfe-commits
mailing list