================
@@ -37,10 +40,55 @@ using Id = uint64_t;
 /// the current session.
 static constexpr Id kCalculateSeq = UINT64_MAX;
 
+/// A wrapper around a 'std::string' to ensure the contents are valid utf8
+/// during serialization.
+class String {
+public:
+  String(std::string str) : m_str(str) {}
----------------
da-viper wrote:

Could you add a move constructor i.e ` String ( std::string && str) : 
m_str(std::move(str))` be cause we will make 2 new copies if we pass in a 
temporary value i.e `String(std::string("some long value from the sb api"))`.  

https://github.com/llvm/llvm-project/pull/181261
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to