[Lldb-commits] [PATCH] D95710: [lldb/Commands] Add command options for ScriptedProcess to ProcessLaunch

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 1 18:24:11 PST 2021


jingham added a comment.

I'm not quite sure why we need the extra m_scripted_process boolean.  Seems like you could key off whether we had a non-empty class_name.  Is there any case where you would want to boolean set w/o having a class name yet?



================
Comment at: lldb/include/lldb/Host/ProcessLaunchInfo.h:188
+  bool m_scripted_process;
+  llvm::StringRef m_scripted_process_class_name;
+  StructuredData::DictionarySP m_scripted_process_dictionary_sp;
----------------
vsk wrote:
> Might be best to use a std::string here, to avoid tying the lifetime of m_scripted_process_class_name to the lifetime of the string stored in m_class_options.
Agreed.  You seldom want to use a StringRef as an ivar, since it doesn't manage lifetimes at all.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95710



More information about the lldb-commits mailing list