From fae34938f6bb1aa1f18d6e285c50f05ef04b021e Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 22 Mar 2025 22:14:45 -0700 Subject: [llvm] Use *Set::insert_range (NFC) (#132591) DenseSet, SmallPtrSet, SmallSet, SetVector, and StringSet recently gained C++23-style insert_range. This patch uses insert_range with iterator ranges. For each case, I've verified that foos is defined as make_range(foo_begin(), foo_end()) or in a similar manner. --- llvm/lib/LTO/LTO.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/LTO/LTO.cpp') diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index b12be4a..97d23fe 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -1439,9 +1439,9 @@ public: AddStream(std::move(AddStream)), Cache(std::move(Cache)), ShouldEmitIndexFiles(ShouldEmitIndexFiles) { auto &Defs = CombinedIndex.cfiFunctionDefs(); - CfiFunctionDefs.insert(Defs.guid_begin(), Defs.guid_end()); + CfiFunctionDefs.insert_range(Defs.guids()); auto &Decls = CombinedIndex.cfiFunctionDecls(); - CfiFunctionDecls.insert(Decls.guid_begin(), Decls.guid_end()); + CfiFunctionDecls.insert_range(Decls.guids()); } virtual Error runThinLTOBackendThread( -- cgit v1.1