summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/nvptx_target_codegen.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-11-21 11:30:43 -0500
committerAlexey Bataev <a.bataev@hotmail.com>2019-11-25 15:01:28 -0500
commitbbc328c62430dd3e2e72973ca85c5c6fb550b227 (patch)
tree07ec8bcbd6cd255edd565ff05d2b6205dd0dbe87 /clang/test/OpenMP/nvptx_target_codegen.cpp
parent7b86188b50bf6e537fe98b326f258fbd23108b83 (diff)
downloadbcm5719-llvm-bbc328c62430dd3e2e72973ca85c5c6fb550b227.tar.gz
bcm5719-llvm-bbc328c62430dd3e2e72973ca85c5c6fb550b227.zip
[OPENMP]Fix PR41826: symbols visibility in device code.
Summary: Currently, we ignore all 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. But in some cases changing of dso locality may lead to problems with codegen, so instead mark external symbols as hidden instead in the device code. Reviewers: jdoerfert Subscribers: guansong, caomhin, kkwli0, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70549
Diffstat (limited to 'clang/test/OpenMP/nvptx_target_codegen.cpp')
-rw-r--r--clang/test/OpenMP/nvptx_target_codegen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/OpenMP/nvptx_target_codegen.cpp b/clang/test/OpenMP/nvptx_target_codegen.cpp
index 333f9166d04..817eca023b6 100644
--- a/clang/test/OpenMP/nvptx_target_codegen.cpp
+++ b/clang/test/OpenMP/nvptx_target_codegen.cpp
@@ -573,7 +573,7 @@ int baz(int f, double &a) {
// CHECK: [[EXIT]]
// CHECK: ret void
- // CHECK: define{{ dso_local | }}i32 [[BAZ]](i32 [[F:%.*]], double* dereferenceable{{.*}})
+ // CHECK: define{{ hidden | }}i32 [[BAZ]](i32 [[F:%.*]], double* dereferenceable{{.*}})
// CHECK: alloca i32,
// CHECK: [[LOCAL_F_PTR:%.+]] = alloca i32,
// CHECK: [[ZERO_ADDR:%.+]] = alloca i32,
OpenPOWER on IntegriCloud