Rework HeaderSearch's interface for getting a module from a name and
for getting the name of the module file, unifying the code for searching for a module with a given name (into lookupModule()) and separating out the mapping to a module file (into getModuleFileName()). No functionality change. llvm-svn: 149197
This commit is contained in:
@@ -226,7 +226,8 @@ bool GenerateModuleAction::BeginSourceFileAction(CompilerInstance &CI,
|
||||
}
|
||||
|
||||
// Dig out the module definition.
|
||||
Module = HS.getModule(CI.getLangOpts().CurrentModule, /*AllowSearch=*/false);
|
||||
Module = HS.lookupModule(CI.getLangOpts().CurrentModule,
|
||||
/*AllowSearch=*/false);
|
||||
if (!Module) {
|
||||
CI.getDiagnostics().Report(diag::err_missing_module)
|
||||
<< CI.getLangOpts().CurrentModule << Filename;
|
||||
|
||||
Reference in New Issue
Block a user