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

Manman Ren via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 17 17:18:40 PDT 2016


manmanren added inline comments.

================
Comment at: lib/Frontend/CompilerInstance.cpp:1503
@@ +1502,3 @@
+        if (!Module || !Module->getASTFile() ||
+            std::string(Module->getASTFile()->getName()) != ModuleFileName) {
+          // Error out if Module does not refer to the file in the prebuilt
----------------
rsmith wrote:
> It'd be safer to check that `FileMgr.getFile(ModuleFileName) == Module->getASTFile()` in case the filename gets canonicalized by the file manager in some way.
Yes you are right. I will update the patch and commit the change.

Thanks for all the useful information!



https://reviews.llvm.org/D23125





More information about the cfe-commits mailing list