From e06dac07a12c997464de11cf6783a7f3269bc8b4 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 16 May 2023 10:54:41 -0700 Subject: [PATCH] [LiveDebugValues] Initialized variable to avoid msan reports Reproducible with =-1 and assert: https://reviews.llvm.org/P8309 Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D150420 --- llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h index beac17f..30de18e 100644 --- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h +++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h @@ -656,7 +656,7 @@ public: // 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 @@ private: 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; -- 2.7.4