aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-02-07 10:33:21 +0000
committerJohn McCall <rjmccall@apple.com>2011-02-07 10:33:21 +0000
commit6b5a61b6dc400027fd793dcadceeb9da944a37ea (patch)
tree8fd6aca5e8914908e0ee03c007988ea87219d2b8 /lib/Sema/TreeTransform.h
parent683564a7a93c952f1fbe573b55c542418d29d859 (diff)
A few more tweaks to the blocks AST representation:
- BlockDeclRefExprs always store VarDecls - BDREs no longer store copy expressions - BlockDecls now store a list of captured variables, information about how they're captured, and a copy expression if necessary With that in hand, change IR generation to use the captures data in blocks instead of walking the block independently. Additionally, optimize block layout by emitting fields in descending alignment order, with a heuristic for filling in words when alignment of the end of the block header is insufficient for the most aligned field. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125005 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/TreeTransform.h')
-rw-r--r--lib/Sema/TreeTransform.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index 472e281553..2a82869786 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -7206,7 +7206,7 @@ TreeTransform<Derived>::TransformBlockExpr(BlockExpr *E) {
for (BlockDecl::capture_iterator i = oldBlock->capture_begin(),
e = oldBlock->capture_end(); i != e; ++i) {
- VarDecl *oldCapture = *i;
+ VarDecl *oldCapture = i->getVariable();
// Ignore parameter packs.
if (isa<ParmVarDecl>(oldCapture) &&
@@ -7216,7 +7216,7 @@ TreeTransform<Derived>::TransformBlockExpr(BlockExpr *E) {
VarDecl *newCapture =
cast<VarDecl>(getDerived().TransformDecl(E->getCaretLocation(),
oldCapture));
- assert(blockScope->Captures.count(newCapture));
+ assert(blockScope->CaptureMap.count(newCapture));
}
#endif