[all-commits] [llvm/llvm-project] ac40a2: Serialization: Change InputFile to use FileEntryRe...

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Mon Nov 30 14:05:10 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ac40a2d8f16b8a8c68fc811d67f647740e965cb8
      https://github.com/llvm/llvm-project/commit/ac40a2d8f16b8a8c68fc811d67f647740e965cb8
  Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
  Date:   2020-11-30 (Mon, 30 Nov 2020)

  Changed paths:
    M clang/include/clang/Basic/FileManager.h
    M clang/include/clang/Basic/SourceManager.h
    M clang/include/clang/Serialization/ModuleFile.h
    M clang/lib/Basic/FileManager.cpp
    M clang/lib/Basic/SourceManager.cpp
    M clang/lib/Serialization/ASTReader.cpp

  Log Message:
  -----------
  Serialization: Change InputFile to use FileEntryRef and add getVirtualFileRef, NFC

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).

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




More information about the All-commits mailing list