forked from OSchip/llvm-project
parent
76c5fae2a0
commit
f5de271a92
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue