[PATCH] D122260: [memprof] Initialize MemInfoBlock data.
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 14:06:34 PDT 2022
tejohnson added inline comments.
================
Comment at: compiler-rt/include/profile/MemProfData.inc:125
NumLifetimeOverlaps(0), NumSameAllocCpu(0),
- NumSameDeallocCpu(0) {
+ NumSameDeallocCpu(0), DataTypeId(0) {
NumMigratedCpu = AllocCpuId != DeallocCpuId;
----------------
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122260/new/
https://reviews.llvm.org/D122260
More information about the llvm-commits
mailing list