File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -529,9 +529,7 @@ Error RawMemProfReader::mapRawProfileToRecords() {
529529 // first non-inline frame.
530530 for (size_t I = 0 ; /* Break out using the condition below*/ ; I++) {
531531 const Frame &F = idToFrame (Callstack[I]);
532- auto Result =
533- FunctionProfileData.insert ({F.Function , IndexedMemProfRecord ()});
534- IndexedMemProfRecord &Record = Result.first ->second ;
532+ IndexedMemProfRecord &Record = FunctionProfileData[F.Function ];
535533 Record.AllocSites .emplace_back (Callstack, CSId, MIB);
536534
537535 if (!F.IsInlineFrame )
@@ -543,8 +541,7 @@ Error RawMemProfReader::mapRawProfileToRecords() {
543541 for (const auto &[Id, Locs] : PerFunctionCallSites) {
544542 // Some functions may have only callsite data and no allocation data. Here
545543 // we insert a new entry for callsite data if we need to.
546- auto Result = FunctionProfileData.insert ({Id, IndexedMemProfRecord ()});
547- IndexedMemProfRecord &Record = Result.first ->second ;
544+ IndexedMemProfRecord &Record = FunctionProfileData[Id];
548545 for (LocationPtr Loc : Locs) {
549546 CallStackId CSId = hashCallStack (*Loc);
550547 CSIdToCallStack.insert ({CSId, *Loc});
You can’t perform that action at this time.
0 commit comments