Skip to content

Commit 60199ee

Browse files
[clang] Use DenseMap::insert_range (NFC) (#133655)
1 parent 6fb6741 commit 60199ee

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

clang/lib/AST/VTableBuilder.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3736,8 +3736,7 @@ void MicrosoftVTableContext::computeVTableRelatedInformation(
37363736
}
37373737
}
37383738

3739-
MethodVFTableLocations.insert(NewMethodLocations.begin(),
3740-
NewMethodLocations.end());
3739+
MethodVFTableLocations.insert_range(NewMethodLocations);
37413740
if (Context.getLangOpts().DumpVTableLayouts)
37423741
dumpMethodLocations(RD, NewMethodLocations, llvm::outs());
37433742
}
@@ -3824,8 +3823,7 @@ const VirtualBaseInfo &MicrosoftVTableContext::computeVBTableRelatedInformation(
38243823
// virtual bases come first so that the layout is the same.
38253824
const VirtualBaseInfo &BaseInfo =
38263825
computeVBTableRelatedInformation(VBPtrBase);
3827-
VBI->VBTableIndices.insert(BaseInfo.VBTableIndices.begin(),
3828-
BaseInfo.VBTableIndices.end());
3826+
VBI->VBTableIndices.insert_range(BaseInfo.VBTableIndices);
38293827
}
38303828

38313829
// New vbases are added to the end of the vbtable.

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,8 +853,7 @@ void CodeGenModule::Release() {
853853
if (CXX20ModuleInits && Primary && !Primary->isHeaderLikeModule())
854854
EmitModuleInitializers(Primary);
855855
EmitDeferred();
856-
DeferredDecls.insert(EmittedDeferredDecls.begin(),
857-
EmittedDeferredDecls.end());
856+
DeferredDecls.insert_range(EmittedDeferredDecls);
858857
EmittedDeferredDecls.clear();
859858
EmitVTablesOpportunistically();
860859
applyGlobalValReplacements();

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ Expected<bool> getSymbolsFromBitcode(MemoryBufferRef Buffer, OffloadKind Kind,
10991099

11001100
// If the file gets extracted we update the table with the new symbols.
11011101
if (ShouldExtract)
1102-
Syms.insert(std::begin(TmpSyms), std::end(TmpSyms));
1102+
Syms.insert_range(TmpSyms);
11031103

11041104
return ShouldExtract;
11051105
}
@@ -1154,7 +1154,7 @@ Expected<bool> getSymbolsFromObject(const ObjectFile &Obj, OffloadKind Kind,
11541154

11551155
// If the file gets extracted we update the table with the new symbols.
11561156
if (ShouldExtract)
1157-
Syms.insert(std::begin(TmpSyms), std::end(TmpSyms));
1157+
Syms.insert_range(TmpSyms);
11581158

11591159
return ShouldExtract;
11601160
}

0 commit comments

Comments
 (0)