From 35b78082565b79125473c6fbd628541ecfa386eb Mon Sep 17 00:00:00 2001 From: "James Helferty (NVIDIA)" Date: Tue, 9 Sep 2025 07:35:57 -0700 Subject: 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 Co-authored-by: Sam Estep --- source/slang/slang_lldb.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'source') 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]] = [] -- cgit v1.2.3