summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2016-11-07 10:01:43 +0000
committerDiana Picus <diana.picus@linaro.org>2016-11-07 10:01:43 +0000
commit1e2b7e667216ec4efceceeb77b681197b17a233d (patch)
tree7dd65a62bdb244dd3b89ff1e6a07d2425e0fdc36 /clang/lib/CodeGen/CGExpr.cpp
parent1071ac193589338bc055e338926d661ab5bf93f6 (diff)
downloadbcm5719-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.cpp11
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),
OpenPOWER on IntegriCloud