================
@@ -104,6 +104,19 @@ ScriptInterpreter::GetStatusFromSBError(const 
lldb::SBError &error) const {
   return Status();
 }
 
+Event *
+ScriptInterpreter::GetOpaqueTypeFromSBEvent(const lldb::SBEvent &event) const {
+  return event.m_opaque_ptr;
+}
+
+Stream *ScriptInterpreter::GetOpaqueTypeFromSBStream(
+    const lldb::SBStream &stream) const {
+  if (stream.m_opaque_up)
+    return const_cast<lldb::SBStream &>(stream).m_opaque_up.release();
----------------
bulbazord wrote:

This feels a little sketchy to me... `GetOpaqueTypeFromSBStream` is taking 
ownership of the underlying pointer and returning it to the caller. The 
`SBStream` that gets passed in is no longer valid. Is this intentional? That 
would mean this function -- and only this function -- has different semantics 
from the other `GetOpaqueTypeFromSBClass` functions.

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

Reply via email to