Nerixyz wrote:
Hmm, we don't actually need to call `get_template_argument_type` here, because
`value` already has the correct type. The following works on Windows too:
```diff
diff --git
a/lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/formatter.py
b/lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/formatter.py
index 3740ce8c451f..38b41ec0b140 100644
---
a/lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/formatter.py
+++
b/lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/formatter.py
@@ -104,11 +104,7 @@ def MyOptionalSummaryProvider(valobj, internal_dict):
summary += ' dup is_null { drop "<could not read MyOptional>" } {'
summary += " @get_value_as_unsigned call" # storage int(hasVal)
summary += ' 0u = { "None" } {'
- summary += " dup @get_type call"
- summary += " 0u @get_template_argument_type call" # storage type
- summary += " swap" # type storage
summary += ' "value" @get_child_with_name call' # type value
- summary += " swap @cast call" # type(value)
summary += ' dup is_null { "None" } {'
summary += (
" dup @summary call dup @strlen call { @get_value call } { drop
} ifelse"
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/bytecode.test
b/lldb/test/Shell/ScriptInterpreter/Python/bytecode.test
index 50012cc5282a..40464db837d9 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/bytecode.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/bytecode.test
@@ -2,7 +2,7 @@
# RUN: %python %S/../../../../examples/python/formatter_bytecode.py --test
-# RUN: %clang_host -std=c++17 -g %S/Inputs/FormatterBytecode/MyOptional.cpp
-fuse-ld=lld -gdwarf -o %t.exe
+# RUN: %clang_host -std=c++17 -g %S/Inputs/FormatterBytecode/MyOptional.cpp -o
%t.exe
# RUN: %lldb %t.exe -o "command script import
%S/../../../../examples/python/formatter_bytecode.py" -o "command script import
%S/Inputs/FormatterBytecode/formatter.py" -o "b -p here" -o "r" -o "v x" -o "v
y" -o q | FileCheck %s --check-prefix=OPTIONAL
# OPTIONAL: (lldb) v x
# OPTIONAL: (MyOptional<int>) x = None {
```
https://github.com/llvm/llvm-project/pull/185002
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits