[PATCH] D92678: ARCMigrate: Migrate ObjCMT.cpp over to FileEntryRef

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 4 11:50:56 PST 2020


dexonsmith created this revision.
dexonsmith added reviewers: arphaman, JDevlieghere, jansvoboda11.
Herald added a subscriber: ributzka.
dexonsmith requested review of this revision.
Herald added a project: clang.

Migrate ObjCMT.cpp from using `const FileEntry*` to `FileEntryRef`. This
is one of the blockers for changing `SourceManager` to use
`FileEntryRef`.

This adds an initial version of `SourceManager::getFileEntryRefForID`,
which uses to `FileEntry::getLastRef`; after `SourceManager` switches,
`SourceManager::getFileEntryForID` will need to call this function.

This also adds uses of `FileEntryRef` as a key in a `DenseMap`, and a
call to `hash_value(Optional)` in `DenseMapInfo<EditEntry>`; support for
these were added in prep commits.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92678

Files:
  clang/include/clang/Basic/SourceManager.h
  clang/lib/ARCMigrate/ObjCMT.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92678.309599.patch
Type: text/x-patch
Size: 3982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201204/ad2b2e3a/attachment.bin>


More information about the cfe-commits mailing list