diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2017-08-29 19:30:57 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-08-29 19:30:57 +0000 |
| commit | 61498fb88f5503e0f38dbca7b0ec8551d2472744 (patch) | |
| tree | 9b87d7eab9ac82c753f8455c5137863ff78e4934 /clang/lib/Sema | |
| parent | 4431bfe88c562e5d4c44b8c2e6f7a24e91e5260c (diff) | |
| download | bcm5719-llvm-61498fb88f5503e0f38dbca7b0ec8551d2472744.tar.gz bcm5719-llvm-61498fb88f5503e0f38dbca7b0ec8551d2472744.zip | |
[OPENMP] Capture global variables in all target executable regions.
Capturing of the global variables occurs only in target regions. Patch
fixes it and allows capturing of globals in all target executable
directives.
llvm-svn: 312024
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index b283681c8da..e3f0e036bd4 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -1278,7 +1278,7 @@ VarDecl *Sema::IsOpenMPCapturedDecl(ValueDecl *D) { // auto *VD = dyn_cast<VarDecl>(D); if (VD && !VD->hasLocalStorage()) { - if (DSAStack->getCurrentDirective() == OMPD_target && + if (isOpenMPTargetExecutionDirective(DSAStack->getCurrentDirective()) && !DSAStack->isClauseParsingMode()) return VD; if (DSAStack->hasDirective( |

