[Lldb-commits] [PATCH] D49739: [WIP] Re-implement MI target-select command.
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 31 09:59:58 PDT 2018
aprantl added inline comments.
================
Comment at: source/API/SBTarget.cpp:1468
+ }
+ if (from[0] && to[0]) {
+ Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
----------------
apolyakov wrote:
> aprantl wrote:
> > apolyakov wrote:
> > > I didn't find nullptr check in other API functions, is it OK or it's better to add it?
> > I would convert it to a ConstString up front and then check whether the ConstString is empty. This way you don't have to worry about nullptr vs empty string.
> Maybe then change method's signature from `const char *` to `ConstString`? I haven't done this since in other methods strings are represented as pointers to char, is it some rule for SB API or not?
In order to map this to Python properly I think we need to keep the signature using const char*.
https://reviews.llvm.org/D49739
More information about the lldb-commits
mailing list