[Clang][OpenMP][NVPTX] Fixed failure in openmp-offload-gpu.c if the system has CUDA

https://lists.llvm.org/pipermail/openmp-dev/2021-March/003940.html reports
test failure in `openmp-offload-gpu.c`. The failure is, when using `-S` in the
clang driver, it still reports bitcode library doesn't exist. However, it is not
exposed in my local run and Phabiractor test. The reason it escaped from Phabricator
test is, the test machine doesn't have CUDA, so `LibDeviceFile` is empty. In this
case, the check of `OPT_S` will be hit, and we get "expected" result. However, if
the test machine has CUDA, `LibDeviceFile` will not be empty, then the check will
not be done, and it just proceeds, trying to add the bitcode library. The reason
it escaped from my local run is, I didn't build ALL targets, so this case was
marked UNSUPPORTED.

Reviewed By: kkwli0

Differential Revision: https://reviews.llvm.org/D98902

GitOrigin-RevId: 53d474abc92c42bed5d0cab5c79ee9ea5666aad1
1 file changed