[clang] [clang][deps] Load module map file from PCM (PR #66389)

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 15 09:16:52 PDT 2023


================
@@ -1307,6 +1307,9 @@ void ModuleMap::setInferredModuleAllowedBy(Module *M,
 
 std::error_code
 ModuleMap::canonicalizeModuleMapPath(SmallVectorImpl<char> &Path) {
+  FileManager &FM = SourceMgr.getFileManager();
+  FM.makeAbsolutePath(Path);
----------------
benlangmuir wrote:

Is the idea that because the paths used by the scanner is now indirected through the (implicit) pcm that whatever ASTWriter does to make the path relative will apply to the explicit module invocation?  Before your current changes the scanner was using `canonicalizeModuleMapPath` directly on the path in the invocation, which is what I was naively thinking of.  

https://github.com/llvm/llvm-project/pull/66389


More information about the cfe-commits mailing list