[PATCH] D150420: [LiveDebugValues] Initialized variable to avoid msan reports

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 18 00:27:09 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe06dac07a12c: [LiveDebugValues] Initialized variable to avoid msan reports (authored by vitalybuka).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150420/new/

https://reviews.llvm.org/D150420

Files:
  llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h


Index: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
===================================================================
--- llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
+++ llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
@@ -656,7 +656,7 @@
 
   // If we discover a new machine location, assign it an mphi with this
   // block number.
-  unsigned CurBB = 0; // FIXME: https://reviews.llvm.org/D150420
+  unsigned CurBB = -1;
 
   /// Cached local copy of the number of registers the target has.
   unsigned NumRegs;
@@ -1094,7 +1094,7 @@
   MLocTracker *MTracker = nullptr;
 
   /// Number of the current block LiveDebugValues is stepping through.
-  unsigned CurBB;
+  unsigned CurBB = -1;
 
   /// Number of the current instruction LiveDebugValues is evaluating.
   unsigned CurInst;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150420.523284.patch
Type: text/x-patch
Size: 808 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230518/7502e5ac/attachment.bin>


More information about the llvm-commits mailing list