[PATCH] D75311: [modules] Allow frameworks to have only a private module without a public one.
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 27 16:11:28 PST 2020
vsapsai marked an inline comment as done.
vsapsai added a comment.
Looks like other module-related tracking like `LoadedModuleMaps`, `DirectoryHasModuleMap` works without extra changes. And `ModuleMapParser` relies on a file name to decide if a module map is private or not, so the presence of a public module map doesn't matter for it.
================
Comment at: clang/lib/Lex/HeaderSearch.cpp:1463-1470
StringRef Filename = llvm::sys::path::filename(File->getName());
SmallString<128> PrivateFilename(File->getDir()->getName());
if (Filename == "module.map")
llvm::sys::path::append(PrivateFilename, "module_private.map");
else if (Filename == "module.modulemap")
llvm::sys::path::append(PrivateFilename, "module.private.modulemap");
else
----------------
We don't try to strip/add file extensions, so won't try to load a module map like 'module.private.private.modulemap'.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75311/new/
https://reviews.llvm.org/D75311
More information about the cfe-commits
mailing list