llvm-project
44b4cc67 - [clang] Fix -chain-include with relative or non-canonical paths (#244269)

Commit
1 day ago
[clang] Fix -chain-include with relative or non-canonical paths (#244269) ChainedIncludesSource registers each intermediate PCH in the in-memory module cache under "<include>.pch<N>", spelled exactly as on the command line. But the PCH that imports it records the import's file name as an absolute, canonical path (ASTWriter::PreparePathForOutput()), so the final reader looks for a different name and fails with "PCH file '...' not found" when the include path is relative, contains "." components, or (on Windows) has mixed separators. Register the buffer under the absolute, canonical name instead.
Author
Parents
Loading