[Lldb-commits] [PATCH] D52604: Clean-up usage of OptionDefinition arrays
Tatyana Krasnukha via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 28 07:48:04 PDT 2018
tatyana-krasnukha added inline comments.
================
Comment at: tools/driver/Driver.cpp:581-585
+ if (g_num_options == 0) {
if (argc > 1)
error.SetErrorStringWithFormat("invalid number of options");
return error;
}
----------------
clayborg wrote:
> Do we even need this if statement and its contents? maybe lldbassert(g_num_options > 0);?
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.
Repository:
rLLDB LLDB
https://reviews.llvm.org/D52604
More information about the lldb-commits
mailing list