labath added a comment.

In D67589#1674640 <https://reviews.llvm.org/D67589#1674640>, @jankratochvil 
wrote:

> Maybe http://lldb.llvm.org/resources/sbapi.html could say that and it would 
> be much more clear.


That's probably a good idea, though I would still keep the list of restrictions 
spelled out as ABI can be broken in a lot of subtle and unobvious ways (at 
least to a person who has never tried to maintain a stable abi).

> 
> 
>>   lldb_private::CommandReturnObjectImpl {
>>     bool owned;
>>     std::unique_ptr<lldb_private::CommandReturnObject> m_opaque_up;
>>   };
> 
> Is this a request to rework this patch this way? If so isn't it safer / more 
> clear to do it rather this way?
> 
>   lldb_private::CommandReturnObjectImpl {
>     bool owned;
>     lldb_private::CommandReturnObject *m_opaque_ptr;
>     ~CommandReturnObjectImpl() { if (owned) delete m_opaque_ptr; }
>   };

I think I would like that better than the swap trick. Since you're now inside a 
pimpl, you can replace the two members with a llvm::PointerIntPair, if you are 
so inclined.


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D67589



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to