[SYCL][OpenMP] Implement thread-local storage restriction
authorMariya Podchishchaeva <mariya.podchishchaeva@intel.com>
Wed, 17 Jun 2020 11:31:38 +0000 (14:31 +0300)
committerAlexey Bader <alexey.bader@intel.com>
Wed, 17 Jun 2020 11:36:00 +0000 (14:36 +0300)
commit0bdcd95bf20f159a2512aff1ef032bec52039bf6
tree0a9b426d3fbe52c47363c4d7d83fed6a01ab88c2
parent076e08aa4501f682c43e71a8fed1e12da485abc7
[SYCL][OpenMP] Implement thread-local storage restriction

Summary:
SYCL and OpenMP prohibits thread local storage in device code,
so this commit ensures that error is emitted for device code and not
emitted for host code when host target supports it.

Reviewers: jdoerfert, erichkeane, bader

Reviewed By: jdoerfert, erichkeane

Subscribers: guansong, riccibruno, ABataev, yaxunl, ebevhan, Anastasia, sstefan1, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81641
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/OpenMP/nvptx_prohibit_thread_local.cpp [new file with mode: 0644]
clang/test/OpenMP/nvptx_target_codegen.cpp
clang/test/SemaSYCL/prohibit-thread-local.cpp [new file with mode: 0644]