diff options
author | Volodymyr Sapsai <vsapsai@apple.com> | 2023-07-26 19:28:58 -0700 |
---|---|---|
committer | Volodymyr Sapsai <vsapsai@apple.com> | 2023-08-10 14:52:49 -0700 |
commit | b070be82bb8fb4414a8a6eb4fbfc77921d89fa4b (patch) | |
tree | 4b118d839a9cd02651b8d7b393d2d340534ce622 /clang/lib/Lex/HeaderSearch.cpp | |
parent | 76a80a080872350d70fc3b3d57b9db8bee54e1df (diff) | |
download | llvm-b070be82bb8fb4414a8a6eb4fbfc77921d89fa4b.zip llvm-b070be82bb8fb4414a8a6eb4fbfc77921d89fa4b.tar.gz llvm-b070be82bb8fb4414a8a6eb4fbfc77921d89fa4b.tar.bz2 |
Reland "[modules] Fix error about the same module being defined in different .pcm files when using VFS overlays."
Fixing Windows buildbot by using the same separators for `-F` and `-I`
paths both in VFS overlay and on command line.
Fix errors like
> module 'MultiPath' is defined in both 'path/to/modules.cache/3JR48BPRU7BCG/MultiPath-1352QHUF8RNMU.pcm' and 'path/to/modules.cache/3JR48BPRU7BCG/MultiPath-20HNSLLIUDDV1.pcm'
To avoid building extra identical modules `-ivfsoverlay` option is not a
part of the hash like "/3JR48BPRU7BCG/". And it is build system's
responsibility to provide `-ivfsoverlay` options that don't cause
observable differences. We also need to make sure the hash like
"-1352QHUF8RNMU" is not affected by `-ivfsoverlay`. As this hash is
defined by the module map path, use the path prior to any VFS
remappings.
rdar://111921464
Differential Revision: https://reviews.llvm.org/D156749
Diffstat (limited to 'clang/lib/Lex/HeaderSearch.cpp')
-rw-r--r-- | clang/lib/Lex/HeaderSearch.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index f42d51d..80e1bad 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -177,7 +177,7 @@ std::string HeaderSearch::getCachedModuleFileName(Module *Module) { // *.modulemap file. In this case, just return an empty string. if (!ModuleMap) return {}; - return getCachedModuleFileName(Module->Name, ModuleMap->getName()); + return getCachedModuleFileName(Module->Name, ModuleMap->getNameAsRequested()); } std::string HeaderSearch::getPrebuiltModuleFileName(StringRef ModuleName, |