Page MenuHomePhabricator

Clean-up usage of OptionDefinition arrays

Authored by tatyana-krasnukha on Sep 27 2018, 4:34 AM.



Removed unused static arrays from headers, removed sentinel entry from OptionDefinition array in Driver.cpp.

Event Timeline


This type is duplicated here to not break the encapsulation of lldb's private types, am I right?

clayborg accepted this revision.Sep 27 2018, 8:59 AM
clayborg added inline comments.

Correct. We want any tool that links against LLDB.framework on darwin, or on other platforms to use the lldb::SB API only.


Do we even need this if statement and its contents? maybe lldbassert(g_num_options > 0);?

This revision is now accepted and ready to land.Sep 27 2018, 8:59 AM

Modifies Driver::ParseArgs checks


I replaced it with static_assert since this expression can be checked at compile time. And added if (argc <= 1) to skip build of long_options_vector if there is no arguments to parse.

clayborg accepted this revision.Sep 28 2018, 10:40 AM
This revision was automatically updated to reflect the committed changes.