Skip to content

Commit 2e75710

Browse files
[memprof] Modernize DataAccessProfRecord (NFC) (#155702)
It's a bit safer to keep the initialization attached to the member variable.
1 parent b8456e2 commit 2e75710

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/ProfileData/DataAccessProf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ struct DataAccessProfRecord {
116116
Locations.emplace_back(Loc.FileName, Loc.Line);
117117
}
118118
// Empty constructor is used in yaml conversion.
119-
DataAccessProfRecord() : AccessCount(0) {}
119+
DataAccessProfRecord() = default;
120120
SymbolHandle SymHandle;
121-
uint64_t AccessCount;
121+
uint64_t AccessCount = 0;
122122
// The locations of data in the source code. Optional.
123123
SmallVector<SourceLocation> Locations;
124124
};

0 commit comments

Comments
 (0)