]> granicus.if.org Git - clang/commit
A few more tweaks to the blocks AST representation:
authorJohn McCall <rjmccall@apple.com>
Mon, 7 Feb 2011 10:33:21 +0000 (10:33 +0000)
committerJohn McCall <rjmccall@apple.com>
Mon, 7 Feb 2011 10:33:21 +0000 (10:33 +0000)
commit6b5a61b6dc400027fd793dcadceeb9da944a37ea
tree8fd6aca5e8914908e0ee03c007988ea87219d2b8
parent683564a7a93c952f1fbe573b55c542418d29d859
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
34 files changed:
include/clang/AST/ASTContext.h
include/clang/AST/Decl.h
include/clang/AST/Expr.h
include/clang/Sema/ScopeInfo.h
lib/AST/ASTContext.cpp
lib/AST/Decl.cpp
lib/AST/Expr.cpp
lib/AST/StmtDumper.cpp
lib/AST/StmtProfile.cpp
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGBlocks.h
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprScalar.cpp
lib/CodeGen/CGObjCGNU.cpp
lib/CodeGen/CGObjCMac.cpp
lib/CodeGen/CGObjCRuntime.h
lib/CodeGen/CodeGenFunction.h
lib/Rewrite/RewriteObjC.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprObjC.cpp
lib/Sema/TreeTransform.h
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriterDecl.cpp
lib/Serialization/ASTWriterStmt.cpp
test/CXX/expr/expr.cast/p4.cpp
test/CodeGen/blocks-1.c
test/CodeGen/blocksignature.c
test/CodeGen/blockstret.c
test/CodeGenObjC/block-var-layout.m
test/CodeGenObjCXX/block-var-layout.mm