[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units
Hamza Sood via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 10 04:53:19 PDT 2018
hamzasood marked 2 inline comments as done.
hamzasood added inline comments.
================
Comment at: lib/Sema/SemaDecl.cpp:16185-16194
+ if (getLangOpts().ModulesTS) {
+ Module *CurrentModule = getCurrentModule();
+ assert(CurrentModule && "Expected to be in a module scope");
+
+ // If the current module has been loaded from disk, then this is an
+ // implementation unit and hence we shouldn't modify the module.
+ // FIXME: Is that a hacky assumption? We can't just check
----------------
rsmith wrote:
> This is not appropriate; generally whether we serialize to an AST file should be treated as orthogonal to whether we're in / importing a module.
>
> The right check here is probably `getLangOpts().getCompilingModule() == CMK_ModuleInterface`.
Thanks! I completely missed that lang opt.
https://reviews.llvm.org/D40443
More information about the cfe-commits
mailing list