[clang][modules][deps] Serialize inputs into PCMs using the "as requested" name
authorJan Svoboda <jan_svoboda@apple.com>
Fri, 2 Dec 2022 23:52:21 +0000 (15:52 -0800)
committerJan Svoboda <jan_svoboda@apple.com>
Sat, 3 Dec 2022 00:12:16 +0000 (16:12 -0800)
commit7806a928688c12accdf47e7f8dc33d484c295858
tree724e8fd5532440e540dc3bd00575061800fb53de
parent40472ef14cd3bbed665789825b47d055e0a83402
[clang][modules][deps] Serialize inputs into PCMs using the "as requested" name

This patch changes the PCM serialization logic to refer to input files by their "requested" name. This fixes a bug where the dependency scanner reports the "final" file paths, which can result in failed explicit compiles due to the `module.modulemap` file not being surrounded by the expected framework directory structure.

Depends on D135634.

Reviewed By: benlangmuir, Bigcheese

Differential Revision: https://reviews.llvm.org/D135636
clang/lib/Serialization/ASTWriter.cpp
clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
clang/test/ClangScanDeps/modules-file-name-as-requested.m [new file with mode: 0644]