[llvm] Non functional change. Initialize var EnumVal to 0. (PR #82987)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 03:43:48 PST 2024


https://github.com/MalaySanghiIntel created https://github.com/llvm/llvm-project/pull/82987

CodeGenInstruction has a new unsigned member EnumVal. It is not initialized in either the class or the constructor.

>From bb0d9a30f91706b1d2094bfbf1fb248d538cabf7 Mon Sep 17 00:00:00 2001
From: Malay Sanghi <malay.sanghi at intel.com>
Date: Mon, 26 Feb 2024 02:41:25 -0800
Subject: [PATCH] Non functional change. Initialize var EnumVal 0.

CodeGenInstruction has a new unsigned member EnumVal. It is not
initialized in either the class or the constructior.
---
 llvm/utils/TableGen/CodeGenInstruction.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/utils/TableGen/CodeGenInstruction.h b/llvm/utils/TableGen/CodeGenInstruction.h
index 11a3acd8e72335..963c9f0b259259 100644
--- a/llvm/utils/TableGen/CodeGenInstruction.h
+++ b/llvm/utils/TableGen/CodeGenInstruction.h
@@ -301,7 +301,7 @@ class CodeGenInstruction {
   Record *InferredFrom;
 
   // The enum value assigned by CodeGenTarget::computeInstrsByEnum.
-  mutable unsigned EnumVal;
+  mutable unsigned EnumVal = 0;
 
   CodeGenInstruction(Record *R);
 



More information about the llvm-commits mailing list