summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/CodeGen/CGExpr.cpp')
-rw-r--r--clang/CodeGen/CGExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/CodeGen/CGExpr.cpp b/clang/CodeGen/CGExpr.cpp
index 1b89e2be511..bd7abec58dd 100644
--- a/clang/CodeGen/CGExpr.cpp
+++ b/clang/CodeGen/CGExpr.cpp
@@ -258,7 +258,7 @@ void CodeGenFunction::EmitStoreThroughLValue(RValue Src, LValue Dst,
LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) {
const Decl *D = E->getDecl();
- if (isa<BlockVarDecl>(D)) {
+ if (isa<BlockVarDecl>(D) || isa<ParmVarDecl>(D)) {
Value *V = LocalDeclMap[D];
assert(V && "BlockVarDecl not entered in LocalDeclMap?");
return LValue::getAddr(V);
OpenPOWER on IntegriCloud