Skip to content

Commit e3076c6

Browse files
authored
[NFC][IR] Use emplace instead of insert (#130360)
Preparation for for CFI Index refactoring, which will fix O(N^2) in ThinLTO indexing.
1 parent d8e8892 commit e3076c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8077,16 +8077,16 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
80778077
case bitc::FS_CFI_FUNCTION_DEFS: {
80788078
auto &CfiFunctionDefs = TheIndex.cfiFunctionDefs();
80798079
for (unsigned I = 0; I != Record.size(); I += 2)
8080-
CfiFunctionDefs.insert(
8081-
{Strtab.data() + Record[I], static_cast<size_t>(Record[I + 1])});
8080+
CfiFunctionDefs.emplace(Strtab.data() + Record[I],
8081+
static_cast<size_t>(Record[I + 1]));
80828082
break;
80838083
}
80848084

80858085
case bitc::FS_CFI_FUNCTION_DECLS: {
80868086
auto &CfiFunctionDecls = TheIndex.cfiFunctionDecls();
80878087
for (unsigned I = 0; I != Record.size(); I += 2)
8088-
CfiFunctionDecls.insert(
8089-
{Strtab.data() + Record[I], static_cast<size_t>(Record[I + 1])});
8088+
CfiFunctionDecls.emplace(Strtab.data() + Record[I],
8089+
static_cast<size_t>(Record[I + 1]));
80908090
break;
80918091
}
80928092

0 commit comments

Comments
 (0)