================ @@ -1634,17 +1752,27 @@ Expected<bool> FunctionImporter::importFunctions( return std::move(Err); auto &ImportGUIDs = FunctionsToImportPerModule->second; + // Find the globals to import SetVector<GlobalValue *> GlobalsToImport; for (Function &F : *SrcModule) { if (!F.hasName()) continue; auto GUID = F.getGUID(); - auto Import = ImportGUIDs.count(GUID); - LLVM_DEBUG(dbgs() << (Import ? "Is" : "Not") << " importing function " - << GUID << " " << F.getName() << " from " - << SrcModule->getSourceFileName() << "\n"); - if (Import) { + auto ImportType = maybeGetImportType(ImportGUIDs, GUID); + + if (!ImportType) { ---------------- teresajohnson wrote:
You could combine this with the below ImportDefinition checking to keep the same flow as before with one debug message, e.g.: ``` auto ImportType = maybeGetImportType(...); auto ImportDefinition = false; if (ImportType) { ImportDefinition = ...; } LLVM_DEBUG(dbgs() << (ImportDefinition ... if (ImportDefinition) { ... ``` https://github.com/llvm/llvm-project/pull/88024 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits