diff options
| author | 2019-09-01 16:27:59 +0000 | |
|---|---|---|
| committer | 2019-09-01 16:27:59 +0000 | |
| commit | b19884b112052f3bf5ff9551374fbd840e2339f2 (patch) | |
| tree | 9e4127bb2a982bb6f8c89d0d7b393e3fac3aee2c /gnu/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp | |
| parent | Add amlmmc(4), a driver for the SD/MMC controller found on various (diff) | |
| download | wireguard-openbsd-b19884b112052f3bf5ff9551374fbd840e2339f2.tar.xz wireguard-openbsd-b19884b112052f3bf5ff9551374fbd840e2339f2.zip | |
Import LLVM 8.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gnu/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp b/gnu/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp index eb1304d8934..44dc1cdee0b 100644 --- a/gnu/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/gnu/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -1518,8 +1518,9 @@ void CodeGenFunction::EmitOMPPrivateLoopCounters( I < E; ++I) { const auto *DRE = cast<DeclRefExpr>(C->getLoopCounter(I)); const auto *VD = cast<VarDecl>(DRE->getDecl()); - // Override only those variables that are really emitted already. - if (LocalDeclMap.count(VD)) { + // Override only those variables that can be captured to avoid re-emission + // of the variables declared within the loops. + if (DRE->refersToEnclosingVariableOrCapture()) { (void)LoopScope.addPrivate(VD, [this, DRE, VD]() { return CreateMemTemp(DRE->getType(), VD->getName()); }); |
