Details
Details
- Reviewers
tejohnson - Commits
- rG61c75eb63727: [memprof] Initialize MemInfoBlock data.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/include/profile/MemProfData.inc | ||
---|---|---|
109–131 | What if this constructor also did the same default initialization as the no-arg constructor, then overwrote the fields given by argument? That way we would not have missed initializations like this if the fields change. |
Comment Actions
PTAl, thanks!
compiler-rt/include/profile/MemProfData.inc | ||
---|---|---|
109–131 | Good idea, we can delegate to the default constructor and only initialize the necessary fields. Also took the opportunity to clean up the snake case arg names to be consistent with the rest of the surrounding code. |
What if this constructor also did the same default initialization as the no-arg constructor, then overwrote the fields given by argument? That way we would not have missed initializations like this if the fields change.