================
@@ -26,3 +30,74 @@ Expression::Expression(ExecutionContextScope &exe_scope)
       m_jit_end_addr(LLDB_INVALID_ADDRESS) {
   assert(m_target_wp.lock());
 }
+
+/// Returns the components of the specified function call label.
+///
+/// The format of \c label is described in \c FunctionCallLabel.
+/// The label prefix is not one of the components.
+static llvm::Expected<llvm::SmallVector<llvm::StringRef, 3>>
+splitFunctionCallLabel(llvm::StringRef label) {
+  if (!label.consume_front(FunctionCallLabelPrefix))
----------------
labath wrote:

You can split this up with
```
llvm::SmallVector<llvm::StringRef, 4> components;
label.split(components, ":", /*MaxSplit=*/3);
if (label[0] != FunctionCallLabelPrefix || label.size()!=4)
  return "bad input";
```

.. at which point this maybe doesn't need to be a separate function?

https://github.com/llvm/llvm-project/pull/148877
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to