[PATCH] D70556: clang/Modules: Refactor CompilerInstance::loadModule, NFC

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 21 12:22:21 PST 2019


dexonsmith marked 2 inline comments as done.
dexonsmith added inline comments.


================
Comment at: clang/include/clang/Frontend/CompilerInstance.h:801-804
+  ModuleLoadResult findOrCompileModuleAndReadAST(StringRef ModuleName,
+                                                 SourceLocation ImportLoc,
+                                                 SourceLocation ModuleNameLoc,
+                                                 bool IsInclusionDirective);
----------------
I put this in the header to reduce how many parameters to pass in by-reference (it felt unnecessarily verbose).  But it's possible to make it a `static` in the source file if that's better.


================
Comment at: clang/lib/Frontend/CompilerInstance.cpp:1867-1874
     /// FIXME: perhaps we should (a) look for a module using the module name
     //  to file map (PrebuiltModuleFiles) and (b) diagnose if still not found?
     //if (Module == nullptr) {
     //  getDiagnostics().Report(ModuleNameLoc, diag::err_module_not_found)
     //    << ModuleName;
     //  ModuleBuildFailed = true;
     //  return ModuleLoadResult();
----------------
Note that this FIXME predates this patch (it has just moved).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70556/new/

https://reviews.llvm.org/D70556





More information about the cfe-commits mailing list