[driver] Fix --core/-c and add test
authorJonas Devlieghere <jonas@devlieghere.com>
Thu, 29 Nov 2018 00:22:28 +0000 (00:22 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Thu, 29 Nov 2018 00:22:28 +0000 (00:22 +0000)
commitcef2af0f3ca753f2a804183fd43760c450682613
treea2aa89d589b36863f97e4df75e2479eceaae685e
parentf2143761d6450d7be992f69602e1826e3e5774f4
[driver] Fix --core/-c and add test

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
lldb/lit/Driver/TestCore.test [new file with mode: 0644]
lldb/lit/Driver/TestFile.test [new file with mode: 0644]
lldb/tools/driver/Driver.cpp
lldb/tools/driver/Options.td