[OPENMP]Fix PR43355: DO not emit target calls if only -fopenmp-targets
authorAlexey Bataev <a.bataev@hotmail.com>
Mon, 23 Sep 2019 15:53:51 +0000 (15:53 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Mon, 23 Sep 2019 15:53:51 +0000 (15:53 +0000)
commit4db9dc6f8109aed80628632f29f6c3a578be41dd
treeb55594f25e70af29a3e674827457ad9d0ea20cfb
parent6784a3cd793ad0de08896caa358a2d481b9e0c44
[OPENMP]Fix PR43355: DO not emit target calls if only -fopenmp-targets
is not provided.

We should not emit any target-dependent code if only -fopenmp flag is
used and device targets are not provided to prevent compiler crash.

llvm-svn: 372623
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/test/OpenMP/declare_target_codegen.cpp