[LTO] - Simplify. NFC.

llvm-svn: 324076
This commit is contained in:
George Rimar 2018-02-02 12:21:26 +00:00
parent 76c5fae2a0
commit f5de271a92
1 changed files with 2 additions and 3 deletions

View File

@ -402,9 +402,8 @@ Error lto::backend(Config &C, AddStreamFn AddStream,
static void dropDeadSymbols(Module &Mod, const GVSummaryMapTy &DefinedGlobals,
const ModuleSummaryIndex &Index) {
auto MaybeDrop = [&](GlobalValue &GV) {
auto It = DefinedGlobals.find(GV.getGUID());
if (It != DefinedGlobals.end())
if (!Index.isGlobalValueLive(It->second))
if (GlobalValueSummary *GVS = DefinedGlobals.lookup(GV.getGUID()))
if (!Index.isGlobalValueLive(GVS))
convertToDeclaration(GV);
};