This is an archive of the discontinued LLVM Phabricator instance.

Serialization: Change InputFile to use FileEntryRef and add getVirtualFileRef, NFC
ClosedPublic

Authored by dexonsmith on Oct 23 2020, 8:49 AM.

Details

Summary

Change the InputFile class to store Optional<FileEntryRef> instead
of FileEntry*. This paged in a few API changes:

  • Added FileManager::getVirtualFileRef, and converted getVirtualFile to a wrapper of it.
  • Updated SourceManager::bypassFileContentsOverride to take FileEntryRef and return Optional<FileEntryRef> (ASTReader::getInputFile is the only caller).

Diff Detail