diff options
author | evgeny <eleviant@accesssoftek.com> | 2019-11-19 15:51:25 +0300 |
---|---|---|
committer | evgeny <eleviant@accesssoftek.com> | 2019-11-19 15:51:25 +0300 |
commit | ef5e3b85eecc26e672fe559089a89062cbeda4b5 (patch) | |
tree | e7160e7c8221a7cec3b621be044b2d93e046a4dd /llvm/lib/LTO/LTO.cpp | |
parent | f6ffe6fc9d9b8b0e197500b5b61f3e8d55599d7a (diff) | |
download | bcm5719-llvm-ef5e3b85eecc26e672fe559089a89062cbeda4b5.tar.gz bcm5719-llvm-ef5e3b85eecc26e672fe559089a89062cbeda4b5.zip |
[ThinLTO] Simplify code. NFC
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r-- | llvm/lib/LTO/LTO.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index 85a14b779a7..ebe22c37c70 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -386,11 +386,10 @@ static bool isWeakObjectWithRWAccess(GlobalValueSummary *GVS) { } static void thinLTOInternalizeAndPromoteGUID( - GlobalValueSummaryList &GVSummaryList, ValueInfo VI, - function_ref<bool(StringRef, ValueInfo)> isExported, + ValueInfo VI, function_ref<bool(StringRef, ValueInfo)> isExported, function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> isPrevailing) { - for (auto &S : GVSummaryList) { + for (auto &S : VI.getSummaryList()) { if (isExported(S->modulePath(), VI)) { if (GlobalValue::isLocalLinkage(S->linkage())) S->setLinkage(GlobalValue::ExternalLinkage); @@ -422,8 +421,8 @@ void llvm::thinLTOInternalizeAndPromoteInIndex( function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> isPrevailing) { for (auto &I : Index) - thinLTOInternalizeAndPromoteGUID( - I.second.SummaryList, Index.getValueInfo(I), isExported, isPrevailing); + thinLTOInternalizeAndPromoteGUID(Index.getValueInfo(I), isExported, + isPrevailing); } // Requires a destructor for std::vector<InputModule>. |