[Lldb-commits] [PATCH] D20565: Add MemoryRegionInfo to SB API

Howard Hellyer via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 1 05:35:31 PDT 2016

hhellyer added a comment.

In http://reviews.llvm.org/D20565#444507, @clayborg wrote:

> My main reason for making sure we use std::unique_ptr is for API compatibility in the future. The size of std::unique_ptr and std::shared_ptr differs and if anyone wrote an IDE or tool that links against the LLDB public API, then we can't switch the layout of a class without breaking our ABI. So it is safest to go with a std::unique_ptr since the backing class is so simple and isn't expensive to copy.

That's reasonable, the objects themselves aren't so large or numerous that not sharing them will make much difference even if we don't ever need to modify them.
SBMemoryRegionInfoList was already using a unique_ptr to hold a reference to its impl object so that didn't need updating.


More information about the lldb-commits mailing list