[Mlir-commits] [mlir] [mlir] Fix uninitialized boolean issue (PR #145466)

Denzel-Brian Budii llvmlistbot at llvm.org
Mon Jun 23 23:42:16 PDT 2025


https://github.com/chios202 updated https://github.com/llvm/llvm-project/pull/145466

>From f151c8e1558073ada82e8d1ab0d902f592957335 Mon Sep 17 00:00:00 2001
From: Denzel-Brian Budii <chio.star at yahoo.com>
Date: Tue, 24 Jun 2025 06:46:09 +0000
Subject: [PATCH] Fix uninitialized boolean value

---
 mlir/lib/Query/Matcher/VariantValue.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mlir/lib/Query/Matcher/VariantValue.cpp b/mlir/lib/Query/Matcher/VariantValue.cpp
index 7bf4774dba830..98ed4cc5df311 100644
--- a/mlir/lib/Query/Matcher/VariantValue.cpp
+++ b/mlir/lib/Query/Matcher/VariantValue.cpp
@@ -172,11 +172,11 @@ void VariantValue::setSigned(int64_t newValue) {
 // Boolean
 bool VariantValue::isBoolean() const { return type == ValueType::Boolean; }
 
-bool VariantValue::getBoolean() const { return value.Signed; }
+bool VariantValue::getBoolean() const { return value.Boolean; }
 
 void VariantValue::setBoolean(bool newValue) {
   type = ValueType::Boolean;
-  value.Signed = newValue;
+  value.Boolean = newValue;
 }
 
 bool VariantValue::isString() const { return type == ValueType::String; }



More information about the Mlir-commits mailing list