jingham added a comment.

We certainly shouldn't duplicate the code for CommandObjectPlatformShell.

Why don't you just add a "m_use_host_platform" ivar to 
CommandObjectPlatformShell, and make two instances of 
CommandObjectPlatformShell, one with m_use_host_platform set to false and added 
as a sub-command of platform, and another instance with m_use_host_platform to 
true, and add that as a base command "shell"?  Then you'd just have to make 
CommandObjectPlatformShell switch on m_use_host_platform and either get the 
selected platform or the host platform.

You'd also have to adjust the help string for one or the other of the commands, 
but CommandObject::SetHelp and SetHelpLong will allow you to do that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79659



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

Reply via email to