[clang] f6f6f19 - [CodeGen] Modernize InstrProfStats (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 27 09:24:44 PDT 2023
Author: Kazu Hirata
Date: 2023-08-27T09:24:29-07:00
New Revision: f6f6f1947da3fd088bd6f8b8d43a31d18ccd750f
URL: https://github.com/llvm/llvm-project/commit/f6f6f1947da3fd088bd6f8b8d43a31d18ccd750f
DIFF: https://github.com/llvm/llvm-project/commit/f6f6f1947da3fd088bd6f8b8d43a31d18ccd750f.diff
LOG: [CodeGen] Modernize InstrProfStats (NFC)
Added:
Modified:
clang/lib/CodeGen/CodeGenModule.h
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index c22dd8486270a0..ce14a6cc55f6af 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -214,16 +214,14 @@ struct ObjCEntrypoints {
/// This class records statistics on instrumentation based profiling.
class InstrProfStats {
- uint32_t VisitedInMainFile;
- uint32_t MissingInMainFile;
- uint32_t Visited;
- uint32_t Missing;
- uint32_t Mismatched;
+ uint32_t VisitedInMainFile = 0;
+ uint32_t MissingInMainFile = 0;
+ uint32_t Visited = 0;
+ uint32_t Missing = 0;
+ uint32_t Mismatched = 0;
public:
- InstrProfStats()
- : VisitedInMainFile(0), MissingInMainFile(0), Visited(0), Missing(0),
- Mismatched(0) {}
+ InstrProfStats() = default;
/// Record that we've visited a function and whether or not that function was
/// in the main source file.
void addVisited(bool MainFile) {
More information about the cfe-commits
mailing list