From a2c76312ed0acd9cb8a1ac03c94c1464a2dbb208 Mon Sep 17 00:00:00 2001 From: Walter Erquinigo Date: Mon, 22 Nov 2021 16:33:11 -0800 Subject: [PATCH] Attempt to fix e3dea5cf0e326366ab95a49d167fde8b0816e292 https://lab.llvm.org/buildbot/#/builders/17/builds/13728 found an issue in the optional formatter. --- lldb/examples/synthetic/gnu_libstdcpp.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lldb/examples/synthetic/gnu_libstdcpp.py b/lldb/examples/synthetic/gnu_libstdcpp.py index 27fca0a..9f1ba29 100644 --- a/lldb/examples/synthetic/gnu_libstdcpp.py +++ b/lldb/examples/synthetic/gnu_libstdcpp.py @@ -35,6 +35,10 @@ class StdOptionalSynthProvider: return 0 def get_child_at_index(self, index): + # some versions of libstdcpp have an additional _M_value child with the actual value + possible_value = self.value.GetChildMemberWithName('_M_value') + if possible_value.IsValid(): + return possible_value.Clone('Value') return self.value.Clone('Value') """ -- 2.7.4