[OpenMP] Protect unrecogonized CUDA error code
authorYe Luo <yeluo@anl.gov>
Mon, 21 Sep 2020 17:42:54 +0000 (13:42 -0400)
committerShilei Tian <tianshilei1992@gmail.com>
Mon, 21 Sep 2020 17:43:08 +0000 (13:43 -0400)
commit03111e5e7a8690300966a39f0aa2e4f2b4ec919a
tree6e3d18e5765c19f3cef6080ca5e7e251b7fd22d1
parent64e2cb7e9605995d2efb625203cbd96db1404812
[OpenMP] Protect unrecogonized CUDA error code

If an error code can not be recognized by cuGetErrorString, errStr remains null and causes crashing at DP() printing.
Protect this case.

Reviewed By: jhuber6, tianshilei1992

Differential Revision: https://reviews.llvm.org/D87980
openmp/libomptarget/plugins/cuda/src/rtl.cpp