[PATCH] D48367: [modules] Fix 37878; Autoload subdirectory modulemaps with specific LangOpts

Bruno Cardoso Lopes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 20 09:52:52 PDT 2018


bruno added a comment.

Hi Yuka, thanks for working on this.



================
Comment at: clang/lib/Lex/HeaderSearch.cpp:285
     // directory.
-    loadSubdirectoryModuleMaps(SearchDirs[Idx]);
+    if (ModMap.getLangOpts().ObjC1 || ModMap.getLangOpts().ObjC2)
+      loadSubdirectoryModuleMaps(SearchDirs[Idx]);
----------------
aprantl wrote:
> Are these flags also enabled in Objective-C++ mode?
Looks like all this logic was introduced in r177621 to allow the names of modules to differ from the name of their subdirectory in the include path.

Instead of having this to be based on the language, it's probably better if we have it based on @import name lookup, which is the scenario where we actually currently look more aggressively, did you try that path?

This is also lacking a testcase, can you create one?


https://reviews.llvm.org/D48367





More information about the cfe-commits mailing list