This is an archive of the discontinued LLVM Phabricator instance.

SourceManager: Migrate to FileEntryRef in getOrCreateContentCache, NFC
ClosedPublic

Authored by dexonsmith on Dec 9 2020, 4:46 PM.

Details

Summary

Change SourceManager::getOrCreateContentCache to take a FileEntryRef
and update call sites (mostly internal to SourceManager.cpp). In a
couple of cases this temporarily relies on FileEntry::getLastRef, but
those can be cleaned up once other APIs switch over.

The one change outside of SourceManager.cpp is in ASTReader.cpp, which
stops relying on the auto-degrade-to-FileEntry* behaviour from
InputFile::getFile since it now needs a FileEntryRef.

No functionality change here.

Diff Detail

Event Timeline

dexonsmith created this revision.Dec 9 2020, 4:46 PM
dexonsmith requested review of this revision.Dec 9 2020, 4:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 9 2020, 4:46 PM
jansvoboda11 accepted this revision.Dec 10 2020, 7:25 AM

This LGTM, but it'd be nice to apply the formatting suggestions.

This revision is now accepted and ready to land.Dec 10 2020, 7:25 AM
This revision was landed with ongoing or failed builds.Jan 25 2021, 5:04 PM
This revision was automatically updated to reflect the committed changes.