Index: lib/LTO/LTO.cpp =================================================================== --- lib/LTO/LTO.cpp +++ lib/LTO/LTO.cpp @@ -338,7 +338,8 @@ GlobalValue *GV = Obj->getSymbolGV(Sym.I->getRawDataRefImpl()); if (Sym.getFlags() & object::BasicSymbolRef::SF_Undefined) - continue; + assert(!Res.Prevailing && + "An undefined symbol cannot have prevailing resolution"); if (Res.Prevailing && GV) { Keep.push_back(GV); switch (GV->getLinkage()) {