[clang] [clang-tools-extra] [clang][modules] Stop uniquing implicit modules via `FileEntry` (PR #185765)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 16 14:06:00 PDT 2026
jansvoboda11 wrote:
I made couple of changes in 7b6c696..2323be8:
1. `ModuleFileName` now stores the length of the `"<context-hash>/<filename>.pcm"` suffix instead of its offset from the start of the path. This enabled me to revert some changes to `ASTWriter/ASTReader` that made the import paths non-relocatable.
2. `ModuleFileName` is now stored on `ModuleFile`, which simplified the serialization code from (from checking `StringRef(M.FileName).starts_with(NormalizedModuleCache)` to checking if `M.FileName.getSuffixLength()` is non-zero.
3. Renamed `ModuleFileName::make_{implicit,explicit}()` to follow LLVM casing conventions.
4. Added new test that checks that regardless of the spelling of the module cache, as long as it resolves to the same directory, the behavior stays consistent.
Can you PTAL?
https://github.com/llvm/llvm-project/pull/185765
More information about the cfe-commits
mailing list