diff options
| author | Florian Mayer <fmayer@google.com> | 2025-10-22 10:55:10 -0700 |
|---|---|---|
| committer | Florian Mayer <fmayer@google.com> | 2025-10-22 10:55:10 -0700 |
| commit | f5f8398d7fe18a968f5873518e87d5fdd8269359 (patch) | |
| tree | 347dff286c3b48b2336fb7a425adfceebd478116 /llvm/lib/LTO/ThinLTOCodeGenerator.cpp | |
| parent | 73edaec4a6cd1212f9ae819c413d2cf58216d3b1 (diff) | |
| parent | a0abc0af0a0a90878822f8107d70dad6f7cdfc26 (diff) | |
Created using spr 1.3.7
Diffstat (limited to 'llvm/lib/LTO/ThinLTOCodeGenerator.cpp')
| -rw-r--r-- | llvm/lib/LTO/ThinLTOCodeGenerator.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp index 5b333cda31fb..ff94c54ab3e6 100644 --- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp +++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp @@ -101,8 +101,8 @@ static void saveTempBitcode(const Module &TheModule, StringRef TempDir, WriteBitcodeToFile(TheModule, OS, /* ShouldPreserveUseListOrder */ true); } -static const GlobalValueSummary * -getFirstDefinitionForLinker(const GlobalValueSummaryList &GVSummaryList) { +static const GlobalValueSummary *getFirstDefinitionForLinker( + ArrayRef<std::unique_ptr<GlobalValueSummary>> GVSummaryList) { // If there is any strong definition anywhere, get it. auto StrongDefForLinker = llvm::find_if( GVSummaryList, [](const std::unique_ptr<GlobalValueSummary> &Summary) { @@ -131,14 +131,15 @@ getFirstDefinitionForLinker(const GlobalValueSummaryList &GVSummaryList) { static void computePrevailingCopies( const ModuleSummaryIndex &Index, DenseMap<GlobalValue::GUID, const GlobalValueSummary *> &PrevailingCopy) { - auto HasMultipleCopies = [&](const GlobalValueSummaryList &GVSummaryList) { - return GVSummaryList.size() > 1; - }; + auto HasMultipleCopies = + [&](ArrayRef<std::unique_ptr<GlobalValueSummary>> GVSummaryList) { + return GVSummaryList.size() > 1; + }; for (auto &I : Index) { - if (HasMultipleCopies(I.second.SummaryList)) + if (HasMultipleCopies(I.second.getSummaryList())) PrevailingCopy[I.first] = - getFirstDefinitionForLinker(I.second.SummaryList); + getFirstDefinitionForLinker(I.second.getSummaryList()); } } |
