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

Denzel Budii llvmlistbot at llvm.org
Mon Jun 23 23:35:58 PDT 2025


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

>From 2eb15043dd85a28806d88270f22de47cf6138a28 Mon Sep 17 00:00:00 2001
From: Denzel-Brian Budii <chio.star at yahoo.com>
Date: Tue, 24 Jun 2025 05:56:52 +0000
Subject: [PATCH] Fix uninitialized boolean

---
 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