[Mlir-commits] [mlir] [NFC] Set a variable in the mlir data formatter (PR #65554)

Walter Erquinigo llvmlistbot at llvm.org
Wed Sep 6 17:13:29 PDT 2023


https://github.com/walter-erquinigo updated https://github.com/llvm/llvm-project/pull/65554:

>From 2401ec465a529534d88b3af6e2aabfd7fd08fb44 Mon Sep 17 00:00:00 2001
From: walter erquinigo <walter at modular.com>
Date: Wed, 6 Sep 2023 20:07:02 -0400
Subject: [PATCH 1/2] [NFC] Set a variable in the mlir data formatter

The formatter fails when num_children is invoked and self.impl_type is not set.
---
 mlir/utils/lldb-scripts/mlirDataFormatters.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mlir/utils/lldb-scripts/mlirDataFormatters.py b/mlir/utils/lldb-scripts/mlirDataFormatters.py
index 41f6227fe9de777..e90190f3d3d9bbb 100644
--- a/mlir/utils/lldb-scripts/mlirDataFormatters.py
+++ b/mlir/utils/lldb-scripts/mlirDataFormatters.py
@@ -5,6 +5,7 @@
 """
 
 import re
+
 import lldb
 
 
@@ -196,6 +197,7 @@ def __init__(self, valobj: lldb.SBValue, internal_dict):
             valobj, self.abstractVal, internal_dict
         )
         if not self.type:
+            self.impl_type = None
             return
 
         # Grab the ImplTy from the resolved type. This is the 3rd template

>From 57afd026f7637ab7248f902c1a27ac8809276bf4 Mon Sep 17 00:00:00 2001
From: Walter Erquinigo <a20012251 at gmail.com>
Date: Wed, 6 Sep 2023 20:13:22 -0400
Subject: [PATCH 2/2] Update mlirDataFormatters.py

---
 mlir/utils/lldb-scripts/mlirDataFormatters.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mlir/utils/lldb-scripts/mlirDataFormatters.py b/mlir/utils/lldb-scripts/mlirDataFormatters.py
index e90190f3d3d9bbb..3282b4a32d503cf 100644
--- a/mlir/utils/lldb-scripts/mlirDataFormatters.py
+++ b/mlir/utils/lldb-scripts/mlirDataFormatters.py
@@ -5,7 +5,6 @@
 """
 
 import re
-
 import lldb
 
 



More information about the Mlir-commits mailing list