clayborg added a comment.

In https://reviews.llvm.org/D47302#1111569, @polyakov.alex wrote:

> In https://reviews.llvm.org/D47302#1111497, @clayborg wrote:
>
> > no. Create a new SBTargetSettings class. SBTarget will hand one out for 
> > global and for target instance settings, Add all settings accessors to 
> > SBTargetSettings class
>
>
> What is a difference between `SBTargetSettings` and `TargetProperties` 
> classes except API level?


Not much difference except everything in SBTargetSettings will need to be 
public C++ API safe (no virtual functions, one member variable in the class 
that is a pointer std::unique_ptr or std::shared_ptr, no inheritance, no STL in 
args or return values, no lldb_private classes in args or return values. For 
this class to be API safe, we will actually need to keep a shared pointer to 
the target properties. So the class in the API header will be something like:

  namespace lldb {
    SBTargetSettings {
      lldb::TargetPropertiesSP m_opaque_sp;
    };
  }

Then m_opaque_sp will be filled in by assiging from a TargetSP (since a shared 
pointer to a target can be converted to a TargetPropertiesSP since Target 
inherits from TargetProperties) or from a call to Target::GetGlobalProperties().


Repository:
  rL LLVM

https://reviews.llvm.org/D47302



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

Reply via email to