[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Thu May 2 11:26:30 PDT 2024


================
@@ -290,6 +290,36 @@ class StructuredData {
 
     void GetDescription(lldb_private::Stream &s) const override;
 
+    /// Creates an Array of substrings by splitting a string around the
+    /// occurrences of a separator character.
+    ///
+    /// Note:
+    /// * This is almost the same API and implementation as `StringRef::split`.
+    /// * Not depending on `StringRef::split` because it will involve a
+    ///   temporary `SmallVectorImpl`.
----------------
bulbazord wrote:

It sounds like this is justifying duplication for efficiency reasons. Have you actually observed that there is an actual gain in duplicating this functionality here? If you're doing this preemptively because it sounds like it should be faster, I would say measure or don't do it at all.

https://github.com/llvm/llvm-project/pull/90703


More information about the lldb-commits mailing list