bruno added a comment.

> It might make more sense to have the module loaded from the AST file shadow 
> the module from the module map, especially for an explicit module build, now 
> that we have that functionality.)

+1, seems a much more consistent model.



================
Comment at: lib/Lex/ModuleMap.cpp:2574-2575
 
+  llvm::SaveAndRestore<bool> OldExplicit(CurrentModuleMapIsExplicitlyProvided);
+  CurrentModuleMapIsExplicitlyProvided |= IsExplicitlyProvided;
+
----------------
rsmith wrote:
> It would seem cleaner to make this a member of `ModuleMapParser` (and 
> explicitly pass down the flag when parsing an `extern module` declaration). 
> Is there a reason to use (essentially) global state for this?
I don't believe there's any reason for using a global state here (and Ben 
doesn't recall any specific reason either). I changed the patch to pass down 
the flag and it works fine.


https://reviews.llvm.org/D31269



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D31269: [Modul... Bruno Cardoso Lopes via Phabricator via cfe-commits

Reply via email to