[all-commits] [llvm/llvm-project] d77588: [llvm][vfs] For virtual directories, use the virtu...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Mon Jul 10 10:41:31 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d77588df4553f0e93a74e6eab33e1ce87b576320
      https://github.com/llvm/llvm-project/commit/d77588df4553f0e93a74e6eab33e1ce87b576320
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M clang/lib/Lex/ModuleMap.cpp
    A clang/test/ClangScanDeps/modules-canononical-module-map-case.c
    M llvm/include/llvm/Support/VirtualFileSystem.h
    M llvm/lib/Support/VirtualFileSystem.cpp
    M llvm/unittests/Support/VirtualFileSystemTest.cpp

  Log Message:
  -----------
  [llvm][vfs] For virtual directories, use the virtual path as the real path

A follow-up to D135841. This patch returns the virtual path for directories from `RedirectingFileSystem`. This ensures the contents of `Path` are the same as the contents of `FS->getRealPath(Path)`. This also means we can drop the workaround in Clang's module map canonicalization, where we couldn't use the real path for a directory if it resolved to a different `DirectoryEntry`. In addition to that, we can also avoid introducing new workaround for a bug triggered by the newly introduced test case.

Reviewed By: benlangmuir

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




More information about the All-commits mailing list