summaryrefslogtreecommitdiff
path: root/lldb/source/DataFormatters/FormatterBytecode.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2025-01-03 15:26:40 -0800
committerGitHub <noreply@github.com>2025-01-03 15:26:40 -0800
commitee1adc5aab4fb517314358ce03cfda426da9c4ce (patch)
tree4a05450d4aac36a1033dd4a89ea47d487e80a197 /lldb/source/DataFormatters/FormatterBytecode.cpp
parentdfa4312c9b092c23b9b2ec366a8851be729953c4 (diff)
[lldb] Add a return opcode to the formatter bytecode (#121602)
In LLVM we love our early exists and this opcode allows for simpler code generation.
Diffstat (limited to 'lldb/source/DataFormatters/FormatterBytecode.cpp')
-rw-r--r--lldb/source/DataFormatters/FormatterBytecode.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/DataFormatters/FormatterBytecode.cpp b/lldb/source/DataFormatters/FormatterBytecode.cpp
index e49c75067818..7f3dbe0dba37 100644
--- a/lldb/source/DataFormatters/FormatterBytecode.cpp
+++ b/lldb/source/DataFormatters/FormatterBytecode.cpp
@@ -304,6 +304,9 @@ llvm::Error Interpret(std::vector<ControlStackElement> &control,
control.pop_back();
activate_block();
continue;
+ case op_return:
+ control.clear();
+ return pc.takeError();
// Literals.
case op_lit_uint: