[llvm] 2e75710 - [memprof] Modernize DataAccessProfRecord (NFC) (#155702)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 27 15:37:32 PDT 2025
Author: Kazu Hirata
Date: 2025-08-27T15:37:28-07:00
New Revision: 2e75710f4a403e15074d616119b56f2d8616075c
URL: https://github.com/llvm/llvm-project/commit/2e75710f4a403e15074d616119b56f2d8616075c
DIFF: https://github.com/llvm/llvm-project/commit/2e75710f4a403e15074d616119b56f2d8616075c.diff
LOG: [memprof] Modernize DataAccessProfRecord (NFC) (#155702)
It's a bit safer to keep the initialization attached to the member
variable.
Added:
Modified:
llvm/include/llvm/ProfileData/DataAccessProf.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ProfileData/DataAccessProf.h b/llvm/include/llvm/ProfileData/DataAccessProf.h
index f410096d83f5e..07230f23f3385 100644
--- a/llvm/include/llvm/ProfileData/DataAccessProf.h
+++ b/llvm/include/llvm/ProfileData/DataAccessProf.h
@@ -116,9 +116,9 @@ struct DataAccessProfRecord {
Locations.emplace_back(Loc.FileName, Loc.Line);
}
// Empty constructor is used in yaml conversion.
- DataAccessProfRecord() : AccessCount(0) {}
+ DataAccessProfRecord() = default;
SymbolHandle SymHandle;
- uint64_t AccessCount;
+ uint64_t AccessCount = 0;
// The locations of data in the source code. Optional.
SmallVector<SourceLocation> Locations;
};
More information about the llvm-commits
mailing list