diff options
| author | George Rimar <grimar@accesssoftek.com> | 2018-02-02 12:21:26 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2018-02-02 12:21:26 +0000 |
| commit | f5de271a9214ac4cb0595d8770d9ea31f894b06c (patch) | |
| tree | e47d0895fba5256432f7f465c254e666f8d0c1bd /llvm/lib/LTO | |
| parent | 76c5fae2a00cf4fb9e662b4c1703412f8901cf43 (diff) | |
| download | bcm5719-llvm-f5de271a9214ac4cb0595d8770d9ea31f894b06c.tar.gz bcm5719-llvm-f5de271a9214ac4cb0595d8770d9ea31f894b06c.zip | |
[LTO] - Simplify. NFC.
llvm-svn: 324076
Diffstat (limited to 'llvm/lib/LTO')
| -rw-r--r-- | llvm/lib/LTO/LTOBackend.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp index 4595ea84b1e..c9d842147f8 100644 --- a/llvm/lib/LTO/LTOBackend.cpp +++ b/llvm/lib/LTO/LTOBackend.cpp @@ -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); }; |

