[PATCH] D40648: A few initializations to please Valgrind. NFC

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 07:12:41 PST 2017


bjope added inline comments.


================
Comment at: include/llvm/CodeGen/MachineOperand.h:193
   explicit MachineOperand(MachineOperandType K)
-    : OpKind(K), SubReg_TargetFlags(0), ParentMI(nullptr) {}
+    : OpKind(K), SubReg_TargetFlags(0),
+      IsDef(0), IsImp(0), IsKill(0), IsDead(0), IsUndef(0),
----------------
Shouldn't we initialize TiedTo here as well?


================
Comment at: include/llvm/CodeGen/MachineOperand.h:194
+    : OpKind(K), SubReg_TargetFlags(0),
+      IsDef(0), IsImp(0), IsKill(0), IsDead(0), IsUndef(0),
+      IsInternalRead(0), IsEarlyClobber(0), IsDebug(0),
----------------
I think it would look nicer if all these bools were initialized to false instead of 0.


https://reviews.llvm.org/D40648





More information about the llvm-commits mailing list