[Lldb-commits] [PATCH] D52604: Clean-up usage of OptionDefinition arrays

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 27 08:59:14 PDT 2018


clayborg accepted this revision.
clayborg added inline comments.
This revision is now accepted and ready to land.


================
Comment at: tools/driver/Driver.cpp:71
 
 typedef struct {
   uint32_t usage_mask; // Used to mark options that can be used together.  If (1
----------------
tatyana-krasnukha wrote:
> This type is duplicated here to not break the encapsulation of lldb's private types, am I right?
Correct. We want any tool that links against LLDB.framework on darwin, or liblldb.so on other platforms to use the lldb::SB API only. 


================
Comment at: tools/driver/Driver.cpp:581-585
+  if (g_num_options == 0) {
     if (argc > 1)
       error.SetErrorStringWithFormat("invalid number of options");
     return error;
   }
----------------
Do we even need this if statement and its contents? maybe lldbassert(g_num_options > 0);?


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D52604





More information about the lldb-commits mailing list