summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Helferty (NVIDIA) <jhelferty@nvidia.com>2025-09-09 07:35:57 -0700
committerGitHub <noreply@github.com>2025-09-09 14:35:57 +0000
commit35b78082565b79125473c6fbd628541ecfa386eb (patch)
tree365d0dc33ef2da7dfc401cb80df05d884c8b4e1f
parent63676c5e51d9d58d3cde7e296f82250b71538b85 (diff)
Enable slang_lldb.py on macos (#8327)
macos 15.6 includes python 3.9.6 with Xcode, which doesn't understand match/case. Changing it to to the less spiffy if/elif. Co-authored-by: Yong He <yonghe@outlook.com> Co-authored-by: Sam Estep <sam@samestep.com>
-rw-r--r--source/slang/slang_lldb.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/source/slang/slang_lldb.py b/source/slang/slang_lldb.py
index a5d2500af..b99055ca7 100644
--- a/source/slang/slang_lldb.py
+++ b/source/slang/slang_lldb.py
@@ -106,17 +106,16 @@ class IRInst_synthetic(lldb.SBSyntheticValueProvider):
# missing in that case. It is possible to fix that by using
# `EvaluateExpression` instead, but that significantly degrades
# performance, so we choose not to do it here.
- match op.value:
- case "kIROp_StringLit":
- string_lit_t = target.FindFirstType("Slang::IRStringLit")
- string_lit = self.valobj.Cast(string_lit_t)
- val = string_lit.GetChildMemberWithName("value")
- value = [("[value]", val.GetChildMemberWithName("stringVal"))]
- case "kIROp_IntLit":
- int_lit_t = target.FindFirstType("Slang::IRIntLit")
- int_lit = self.valobj.Cast(int_lit_t)
- val = int_lit.GetChildMemberWithName("value")
- value = [("[value]", val.GetChildMemberWithName("intVal"))]
+ if op.value == "kIROp_StringLit":
+ string_lit_t = target.FindFirstType("Slang::IRStringLit")
+ string_lit = self.valobj.Cast(string_lit_t)
+ val = string_lit.GetChildMemberWithName("value")
+ value = [("[value]", val.GetChildMemberWithName("stringVal"))]
+ elif op.value == "kIROp_IntLit":
+ int_lit_t = target.FindFirstType("Slang::IRIntLit")
+ int_lit = self.valobj.Cast(int_lit_t)
+ val = int_lit.GetChildMemberWithName("value")
+ value = [("[value]", val.GetChildMemberWithName("intVal"))]
# operands
operands: list[tuple[str, lldb.SBValue]] = []