From 683e2bf059a6e5e0bb9dc2628218b53dc2d1b490 Mon Sep 17 00:00:00 2001 From: Teresa Johnson Date: Tue, 21 Oct 2025 06:53:40 -0700 Subject: [ThinLTO] Make SummaryList private (NFC) (#164355) In preparation for a follow on change that will require checking every time a new summary is added to the SummaryList for a GUID, make the SummaryList private and require all accesses to go through one of two new interfaces. Most changes are to access the list via the read only getSummaryList() method, and the few that add new summaries (e.g. while building the combined summary) use the new addSummary() method. --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 8ff3aa9..61aa7c2f5 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -235,7 +235,7 @@ public: return; for (const auto &GUIDSummaryLists : *Index) // Examine all summaries for this GUID. - for (auto &Summary : GUIDSummaryLists.second.SummaryList) + for (auto &Summary : GUIDSummaryLists.second.getSummaryList()) if (auto FS = dyn_cast(Summary.get())) { // For each call in the function summary, see if the call // is to a GUID (which means it is for an indirect call, @@ -587,7 +587,7 @@ public: } } else { for (auto &Summaries : Index) - for (auto &Summary : Summaries.second.SummaryList) + for (auto &Summary : Summaries.second.getSummaryList()) Callback({Summaries.first, Summary.get()}, false); } } -- cgit v1.1