[Clang][ScanDeps] Use the virtual path for module maps
authorMichael Spencer <bigcheesegs@gmail.com>
Tue, 14 Dec 2021 18:18:31 +0000 (11:18 -0700)
committerMichael Spencer <michael_spencer@apple.com>
Tue, 14 Dec 2021 18:21:42 +0000 (11:21 -0700)
commit04192422c4e3b730c580498b8e948088cb15580b
tree11e56a4f34fe0e0b00b2deeb23682b81584a37a9
parentaeea20eebef57c6885282a2032c63eac36d33469
[Clang][ScanDeps] Use the virtual path for module maps

Make clang-scan-deps use the virtual path for module maps instead of the on disk
path. This is needed so that modulemap relative lookups are done correctly in
the actual module builds. The file dependencies still use the on disk path as
that's what matters for build invalidation.

Differential Revision: https://reviews.llvm.org/D114206
clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
clang/test/ClangScanDeps/modulemap-via-vfs.m [new file with mode: 0644]