summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.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
commit351762cda239e2bb90fb2084e546878fea90ebf6 (patch)
tree22efeaf25ffe22b569427e2cb8054db1c5ec5172 /clang/lib/CodeGen/CGDebugInfo.h
parent867cb633b428b0017ea8ecf548176ae6000fcef2 (diff)
downloadbcm5719-llvm-351762cda239e2bb90fb2084e546878fea90ebf6.tar.gz
bcm5719-llvm-351762cda239e2bb90fb2084e546878fea90ebf6.zip
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. llvm-svn: 125005
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.h')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
index 4b24d79c811..6a9ab9c58b5 100644
--- a/clang/lib/CodeGen/CGDebugInfo.h
+++ b/clang/lib/CodeGen/CGDebugInfo.h
@@ -37,6 +37,7 @@ namespace CodeGen {
class CodeGenModule;
class CodeGenFunction;
class GlobalDecl;
+ class CGBlockInfo;
/// CGDebugInfo - This class gathers all debug information during compilation
/// and is responsible for emitting to llvm globals or pass directly to
@@ -169,10 +170,10 @@ public:
/// EmitDeclareOfBlockDeclRefVariable - Emit call to llvm.dbg.declare for an
/// imported variable declaration in a block.
- void EmitDeclareOfBlockDeclRefVariable(const BlockDeclRefExpr *BDRE,
- llvm::Value *AI,
+ void EmitDeclareOfBlockDeclRefVariable(const VarDecl *variable,
+ llvm::Value *storage,
CGBuilderTy &Builder,
- CodeGenFunction *CGF);
+ const CGBlockInfo &blockInfo);
/// EmitDeclareOfArgVariable - Emit call to llvm.dbg.declare for an argument
/// variable declaration.
@@ -195,9 +196,10 @@ private:
void EmitDeclare(const VarDecl *decl, unsigned Tag, llvm::Value *AI,
CGBuilderTy &Builder);
- /// EmitDeclare - Emit call to llvm.dbg.declare for a variable declaration.
- void EmitDeclare(const BlockDeclRefExpr *BDRE, unsigned Tag, llvm::Value *AI,
- CGBuilderTy &Builder, CodeGenFunction *CGF);
+ /// EmitDeclare - Emit call to llvm.dbg.declare for a variable
+ /// declaration from an enclosing block.
+ void EmitDeclare(const VarDecl *decl, unsigned Tag, llvm::Value *AI,
+ CGBuilderTy &Builder, const CGBlockInfo &blockInfo);
// EmitTypeForVarWithBlocksAttr - Build up structure info for the byref.
// See BuildByRefType.
OpenPOWER on IntegriCloud