Because the optarg variable was shadowed we didn't notice we weren't
extracting the value from the option. This patch fixes that and renames
the variable to prevent this from happening in the future.
I also added two tests to check the error output for --core and --file
when the given value doesn't exist.
llvm-svn: 347821
This patch modifies the lldb driver to use libOption for option parsing.
It allows us to decouple option parsing from option processing which is
important when arguments affect initialization. This was previously not
possible because the debugger need to be initialized as some option
interpretation (like the scripting language etc) was handled by the
debugger, rather than in the driver.
Differential revision: https://reviews.llvm.org/D54692
llvm-svn: 347709