================
@@ -33,6 +33,23 @@
using namespace clang;
+std::optional<ModuleFileKey>
+ModuleFileName::makeKey(FileManager &FileMgr) const {
+ if (Separator) {
+ StringRef ModuleCachePath = StringRef(Path).substr(0, *Separator);
+ StringRef ModuleFilePathSuffix = StringRef(Path).substr(*Separator);
+ if (auto ModuleCache = FileMgr.getOptionalDirectoryRef(
+ ModuleCachePath, /*CacheFailure=*/false))
+ return ModuleFileKey(*ModuleCache, ModuleFilePathSuffix);
+ } else {
+ if (auto ModuleFile = FileMgr.getOptionalFileRef(Path, /*OpenFile=*/true,
----------------
benlangmuir wrote:
Why `/*OpenFile=*/true,`? Are we still playing games trying to always open a
module file and keep it open permanently?
https://github.com/llvm/llvm-project/pull/185994
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits