diff --git a/lib/ProfileData/InstrProfWriter.cpp b/lib/ProfileData/InstrProfWriter.cpp index 320860a4cb4..3024f9676e3 100644 --- a/lib/ProfileData/InstrProfWriter.cpp +++ b/lib/ProfileData/InstrProfWriter.cpp @@ -23,7 +23,9 @@ error_code InstrProfWriter::addFunctionCounts(StringRef FunctionName, auto Where = FunctionData.find(FunctionName); if (Where == FunctionData.end()) { // If this is the first time we've seen this function, just add it. - FunctionData[FunctionName] = {FunctionHash, Counters}; + auto &Data = FunctionData[FunctionName]; + Data.Hash = FunctionHash; + Data.Counts = Counters; return instrprof_error::success;; }