[Lldb-commits] [PATCH] D151597: [lldb][NFCI] Remove use of ConstString from IOHandler

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 12 14:51:15 PDT 2023


JDevlieghere added inline comments.


================
Comment at: lldb/include/lldb/Core/IOHandler.h:110
+  virtual llvm::StringRef GetControlSequence(char ch) {
+    return llvm::StringRef();
+  }
----------------
I would `return {}` or `return ""`. 


================
Comment at: lldb/include/lldb/Core/IOHandler.h:302-303
       : IOHandlerDelegate(completion),
-        m_end_line((end_line && end_line[0]) ? end_line : "") {}
+        m_end_line((end_line && end_line[0]) ? std::string(end_line) + "\n"
+                                             : "\n") {}
 
----------------
Can we make end_line a `StringRef`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151597/new/

https://reviews.llvm.org/D151597



More information about the lldb-commits mailing list