[all-commits] [llvm/llvm-project] 898d61: ARCMigrate: Migrate ObjCMT.cpp over to FileEntryRef

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Wed Dec 9 14:16:27 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 898d61b3cff5d79870d964c76d82764fef73efbb
      https://github.com/llvm/llvm-project/commit/898d61b3cff5d79870d964c76d82764fef73efbb
  Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
  Date:   2020-12-09 (Wed, 09 Dec 2020)

  Changed paths:
    M clang/include/clang/Basic/SourceManager.h
    M clang/lib/ARCMigrate/ObjCMT.cpp

  Log Message:
  -----------
  ARCMigrate: Migrate ObjCMT.cpp over to FileEntryRef

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.

Differential Revision: https://reviews.llvm.org/D92678




More information about the All-commits mailing list