From ee1adc5aab4fb517314358ce03cfda426da9c4ce Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 3 Jan 2025 15:26:40 -0800 Subject: [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. --- lldb/source/DataFormatters/FormatterBytecode.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lldb/source/DataFormatters/FormatterBytecode.cpp') 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 &control, control.pop_back(); activate_block(); continue; + case op_return: + control.clear(); + return pc.takeError(); // Literals. case op_lit_uint: -- cgit v1.2.3