This is an archive of the discontinued LLVM Phabricator instance.

SourceManager: Change SourceManager::isMainFile to take a FileEntry, NFC
ClosedPublic

Authored by dexonsmith on Oct 15 2020, 3:34 PM.

Details

Summary

SourceManager::isMainFile does not use the filename, so it doesn't
need the full FileEntryRef; in fact, it's misleading to take the name
because that makes it look relevant. Simplify the API, and in the
process remove some calls to FileEntryRef::FileEntryRef in the unit
tests (which were blocking making that private to SourceManager).

Diff Detail