[PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 3 11:09:07 PDT 2016


benlangmuir added a comment.

How about -fmodules-use-prebuilt-**module-cache** for the flag name?  Saying "prebuilt-modules" is confusing to me, since -fmodule-file can also be used to load a prebuilt module, but doesn't use a cache.


================
Comment at: lib/Driver/Tools.cpp:5416
@@ -5408,1 +5415,3 @@
 
+  if (Args.getLastArg(options::OPT_fmodules_use_prebuilt_modules)) {
+    // When using prebuilt modules, we disable module hash.
----------------
```
if (IsPrebuilt) {
```

================
Comment at: lib/Frontend/CompilerInstance.cpp:1491
@@ +1490,3 @@
+            false/*IsExplicit*/).first;
+        Module->IsSystem = true;
+        Module->IsFromModuleFile = true;
----------------
Why do we assume this?


https://reviews.llvm.org/D23125





More information about the cfe-commits mailing list