From 39ccd24126fcb99e95f15e49278a88adece2319a Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Tue, 13 Sep 2016 18:45:13 +0000 Subject: [LTO] Don't pass SF_Undefined symbols to the IRmover. This should fix PR 30363. llvm-svn: 281366 --- llvm/lib/LTO/LTO.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/LTO/LTO.cpp') diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index f495774b033..0323bb83858 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -337,6 +337,8 @@ Error LTO::addRegularLTO(std::unique_ptr Input, addSymbolToGlobalRes(Obj.get(), Used, Sym, Res, 0); GlobalValue *GV = Obj->getSymbolGV(Sym.I->getRawDataRefImpl()); + if (Sym.getFlags() & object::BasicSymbolRef::SF_Undefined) + continue; if (Res.Prevailing && GV) { Keep.push_back(GV); switch (GV->getLinkage()) { -- cgit v1.2.3