summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2018-08-07 16:14:36 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2018-08-07 16:14:36 +0000
commitbf8fe71b91ae4f2f223c6a7aa7e51c6aa4d6f329 (patch)
tree7da9deb1e688a7716827e7104dee5076d1ae47ef /clang/lib/CodeGen/CodeGenModule.cpp
parentab2cbad6fecd0b874dc51aaed0f3fb7aab8ebe4b (diff)
downloadbcm5719-llvm-bf8fe71b91ae4f2f223c6a7aa7e51c6aa4d6f329.tar.gz
bcm5719-llvm-bf8fe71b91ae4f2f223c6a7aa7e51c6aa4d6f329.zip
[OPENMP] Mark variables captured in declare target region as implicitly
declare target. According to OpenMP 5.0, variables captured in lambdas in declare target regions must be considered as implicitly declare target. llvm-svn: 339152
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 8c5e0df0969..dedd57efbd9 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1747,6 +1747,10 @@ void CodeGenModule::EmitModuleLinkOptions() {
}
void CodeGenModule::EmitDeferred() {
+ // Emit deferred declare target declarations.
+ if (getLangOpts().OpenMP && !getLangOpts().OpenMPSimd)
+ getOpenMPRuntime().emitDeferredTargetDecls();
+
// Emit code for any potentially referenced deferred decls. Since a
// previously unused static decl may become used during the generation of code
// for a static function, iterate until no changes are made.
OpenPOWER on IntegriCloud