[PATCH] Add -fno-modules-implicit-builds.
Richard Smith
richard at metafoo.co.uk
Thu Dec 18 18:31:37 PST 2014
Please add test coverage showing that we can use explicitly-specified modules via `-fmodule-file=`, and that we can't use implicitly-build modules that are in the cache.
================
Comment at: lib/Frontend/CompilerInstance.cpp:1363-1367
@@ -1362,2 +1362,7 @@
Known = KnownModules.insert(std::make_pair(Path[0].first, Module)).first;
+ } else if (!getLangOpts().ImplicitModules) {
+ getDiagnostics().Report(ModuleNameLoc, diag::err_module_build_disabled)
+ << ModuleName;
+ ModuleBuildFailed = true;
+ return ModuleLoadResult();
} else {
----------------
This will also reject modules loaded via `-fmodule-file=`.
================
Comment at: lib/Frontend/CompilerInstance.cpp:1380
@@ -1374,3 +1379,3 @@
auto Override = ModuleFileOverrides.find(ModuleName);
bool Explicit = Override != ModuleFileOverrides.end();
----------------
The check should go somewhere around here, after we've determined whether the user gave us a file containing this module. `if (!Explicit && !ImplicitModules)`.
http://reviews.llvm.org/D6707
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list