SourceManager: Unify FileEntry/FileEntryRef versions of createFileID
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 26 Jan 2021 00:54:12 +0000 (16:54 -0800)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 26 Jan 2021 01:03:12 +0000 (17:03 -0800)
commit46b1645e6c4fe5020ae08e4d94b3de0c80117b4b
treee220a90e81729d188661e02d955fbeb8c99a7f64
parentcda4d3d37f1490e2586ba9147f94e87bc860fa78
SourceManager: Unify FileEntry/FileEntryRef versions of createFileID

Change `SourceManager::createFileID(const FileEntry*)` to defer to
`SourceManager::createFileID(FileEntryRef)`. This fixes an unexercised
bug where the latter gained support for named pipes and the former
didn't, but since we're trying to remove all calls to the former it
doesn't really make sense to test this explicitly now that the
implementation is hollowed out.

This is a belated follow-up to 245218bb355599771ba43a0fe1449d1670f2666c,
which sunk named pipe support into FileManager and SourceManager. The
original version of that patch was based on top of
https://reviews.llvm.org/D92984, which removed the `FileEntry` overload
of `createFileID()`, and I missed the subtle difference when it was
rebased.
clang/lib/Basic/SourceManager.cpp