[all-commits] [llvm/llvm-project] b2a7f1: Remove a few effectively-unused FileEntry APIs. NFC

Sam McCall via All-commits all-commits at lists.llvm.org
Thu Apr 7 07:46:01 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b2a7f1c3904ede781565c6ed772f155167aa8325
      https://github.com/llvm/llvm-project/commit/b2a7f1c3904ede781565c6ed772f155167aa8325
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2022-04-07 (Thu, 07 Apr 2022)

  Changed paths:
    M clang/include/clang/Basic/DirectoryEntry.h
    M clang/include/clang/Basic/FileEntry.h
    M clang/lib/Basic/FileManager.cpp
    M clang/lib/Frontend/LogDiagnosticPrinter.cpp
    M clang/lib/Frontend/TextDiagnostic.cpp
    M clang/unittests/Basic/FileEntryTest.cpp
    M clang/unittests/Basic/FileManagerTest.cpp

  Log Message:
  -----------
  Remove a few effectively-unused FileEntry APIs. NFC

- isValid: FileManager only ever returns valid FileEntries (see next point)

- construction from outside FileManager (both FileEntry and DirectoryEntry).
  It's not possible to create a useful FileEntry this way, there are no setters.
  This was only used in FileEntryTest, added a friend to enable this.
  A real constructor is cleaner but requires larger changes to FileManager.

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




More information about the All-commits mailing list