diff options
| author | Diana Picus <diana.picus@linaro.org> | 2016-11-07 10:01:43 +0000 |
|---|---|---|
| committer | Diana Picus <diana.picus@linaro.org> | 2016-11-07 10:01:43 +0000 |
| commit | 1e2b7e667216ec4efceceeb77b681197b17a233d (patch) | |
| tree | 7dd65a62bdb244dd3b89ff1e6a07d2425e0fdc36 /clang/lib/CodeGen/CGExpr.cpp | |
| parent | 1071ac193589338bc055e338926d661ab5bf93f6 (diff) | |
| download | bcm5719-llvm-1e2b7e667216ec4efceceeb77b681197b17a233d.tar.gz bcm5719-llvm-1e2b7e667216ec4efceceeb77b681197b17a233d.zip | |
Revert "[OPENMP] Fixed capturing of VLA variables."
This reverts commit r286098 because the modified test breaks on many of the
buildbots.
llvm-svn: 286102
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index a5eee2e4120..74c552583c4 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -2127,11 +2127,12 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { if (auto *FD = LambdaCaptureFields.lookup(VD)) return EmitCapturedFieldLValue(*this, FD, CXXABIThisValue); else if (CapturedStmtInfo) { - auto I = LocalDeclMap.find(VD); - if (I != LocalDeclMap.end()) { - if (auto RefTy = VD->getType()->getAs<ReferenceType>()) - return EmitLoadOfReferenceLValue(I->second, RefTy); - return MakeAddrLValue(I->second, T); + auto it = LocalDeclMap.find(VD); + if (it != LocalDeclMap.end()) { + if (auto RefTy = VD->getType()->getAs<ReferenceType>()) { + return EmitLoadOfReferenceLValue(it->second, RefTy); + } + return MakeAddrLValue(it->second, T); } LValue CapLVal = EmitCapturedFieldLValue(*this, CapturedStmtInfo->lookup(VD), |

