diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2019-05-21 18:20:08 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-05-21 18:20:08 +0000 |
| commit | 6b21c4a4eed8e7a5ab5d80dfe207eadb7cf5a6ab (patch) | |
| tree | 0e0c17b3356549787796cc107bdb4c58764247a7 /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | c1b6b9a177760b73f3cfb1c8df5f9cb0a3253068 (diff) | |
| download | bcm5719-llvm-6b21c4a4eed8e7a5ab5d80dfe207eadb7cf5a6ab.tar.gz bcm5719-llvm-6b21c4a4eed8e7a5ab5d80dfe207eadb7cf5a6ab.zip | |
[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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index e592442e6bd..f062f83425a 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -798,7 +798,7 @@ static bool shouldAssumeDSOLocal(const CodeGenModule &CGM, const auto &CGOpts = CGM.getCodeGenOpts(); llvm::Reloc::Model RM = CGOpts.RelocationModel; const auto &LOpts = CGM.getLangOpts(); - if (RM != llvm::Reloc::Static && !LOpts.PIE) + if (RM != llvm::Reloc::Static && !LOpts.PIE && !LOpts.OpenMPIsDevice) return false; // A definition cannot be preempted from an executable. |

