[PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 17 16:59:05 PDT 2016
rsmith 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
----------------
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.
https://reviews.llvm.org/D23125
More information about the cfe-commits
mailing list