[Driver][SYCL] Fix crash with empty -fsycl-targets option
When -fsycl-targets= -fsycl-targets=arg is passed on the command line, the empty -fsycl-targets= is processed and crashes due to the empty argument. Update the specific option parsing to use 'getLastArg' to avoid this situation. When the last arg has an empty argument, the driver will diagnose this situation and emit a friendly diagnostic.
When the last arg has an empty argument, the driver will diagnose this situation and emit a friendly diagnostic.
I'm not able to see the corresponding code changes for this in the PR.
When the last arg has an empty argument, the driver will diagnose this situation and emit a friendly diagnostic.
I'm not able to see the corresponding code changes for this in the PR.
There are no explicit changes that reflect this - it is existing behavior:
> clang++ -fsycl -fsycl-targets= ~/a.cpp
clang++: warning: joined argument expects additional value: '-fsycl-targets=' [-Wunused-command-line-argument]
@intel/llvm-gatekeepers, this change looks ready to merge, please take a look. Thanks!