aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-12-08 09:08:17 +0000
committerJohn McCall <rjmccall@apple.com>2009-12-08 09:08:17 +0000
commitdbd872f273a8dbf22e089b3def6c09f0a460965d (patch)
treec8cfd035661ae13cd3d2a147a748714c0e8b9de3 /lib/CodeGen/CGBlocks.cpp
parent7c9624ba29bc700c3aa6c65c5363174a890c534e (diff)
DeclRefExpr stores a ValueDecl internally.
Template instantiation can re-use DeclRefExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index 9fc2c1a97d..9e44db0aa0 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -296,7 +296,7 @@ llvm::Value *CodeGenFunction::BuildBlockLiteralTmp(const BlockExpr *BE) {
++helpersize;
continue;
} else
- E = new (getContext()) DeclRefExpr (cast<NamedDecl>(VD),
+ E = new (getContext()) DeclRefExpr (VD,
VD->getType(),
SourceLocation());
}