// via a WriteIndexesThinBackend.
FunctionImporter::ImportMapTy ImportList;
for (auto &GlobalList : *CombinedIndex) {
+ // Ignore entries for undefined references.
+ if (GlobalList.second.SummaryList.empty())
+ continue;
+
auto GUID = GlobalList.first;
- assert(GlobalList.second.size() == 1 &&
+ assert(GlobalList.second.SummaryList.size() == 1 &&
"Expected individual combined index to have one summary per GUID");
- auto &Summary = GlobalList.second[0];
+ auto &Summary = GlobalList.second.SummaryList[0];
// Skip the summaries for the importing module. These are included to
// e.g. record required linkage changes.
if (Summary->modulePath() == M->getModuleIdentifier())
target triple = "x86_64-unknown-linux-gnu"
declare void @f2()
+declare i8* @f3()
define void @f1() {
call void @f2()
+ ; Make sure that the backend can handle undefined references.
+ ; Do an indirect call so that the undefined ref shows up in the combined index.
+ call void bitcast (i8*()* @f3 to void()*)()
ret void
}