[OPENMP]Use the attributes for dso locality when building for device.
authorAlexey Bataev <a.bataev@hotmail.com>
Tue, 21 May 2019 18:20:08 +0000 (18:20 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Tue, 21 May 2019 18:20:08 +0000 (18:20 +0000)
commit6b21c4a4eed8e7a5ab5d80dfe207eadb7cf5a6ab
tree0e0c17b3356549787796cc107bdb4c58764247a7
parentc1b6b9a177760b73f3cfb1c8df5f9cb0a3253068
[OPENMP]Use the attributes for dso locality when building for device.

Currently, we ignore all dso locality attributes/info when building for
the device and thus all symblos are externally visible and can be
preemted at the runtime. It may lead to incorrect results. We need to
follow the same logic, compiler uses for static/pie builds.

llvm-svn: 361283
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/OpenMP/declare_target_codegen.cpp
clang/test/OpenMP/nvptx_allocate_codegen.cpp
clang/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp
clang/test/OpenMP/nvptx_target_codegen.cpp
clang/test/OpenMP/nvptx_unsupported_type_codegen.cpp