Deleted Added
full compact
151,170d150
< /// BlockInfo - Information to generate a block literal.
< struct BlockInfo {
< /// BlockLiteralTy - The type of the block literal.
< const llvm::Type *BlockLiteralTy;
<
< /// Name - the name of the function this block was created for, if any.
< const char *Name;
<
< /// ByCopyDeclRefs - Variables from parent scopes that have been imported
< /// into this block.
< llvm::SmallVector<const BlockDeclRefExpr *, 8> DeclRefs;
<
< BlockInfo(const llvm::Type *blt, const char *n)
< : BlockLiteralTy(blt), Name(n) {
< // Skip asm prefix, if any.
< if (Name && Name[0] == '\01')
< ++Name;
< }
< };
<
182,184c162,164
< /// getBlockOffset - Allocate an offset for the ValueDecl from a
< /// BlockDeclRefExpr in a block literal (BlockExpr).
< CharUnits getBlockOffset(const BlockDeclRefExpr *E);
---
> /// getBlockOffset - Allocate a location within the block's storage
> /// for a value with the given size and alignment requirements.
> CharUnits getBlockOffset(CharUnits Size, CharUnits Align);
189,191c169,179
< /// BlockDeclRefDecls - Decls from BlockDeclRefExprs in apperance order
< /// in a block literal. Decls without names are used for padding.
< llvm::SmallVector<const Expr *, 8> BlockDeclRefDecls;
---
> /// BlockLayout - The layout of the block's storage, represented as
> /// a sequence of expressions which require such storage. The
> /// expressions can be:
> /// - a BlockDeclRefExpr, indicating that the given declaration
> /// from an enclosing scope is needed by the block;
> /// - a DeclRefExpr, which always wraps an anonymous VarDecl with
> /// array type, used to insert padding into the block; or
> /// - a CXXThisExpr, indicating that the C++ 'this' value should
> /// propagate from the parent to the block.
> /// This is a really silly representation.
> llvm::SmallVector<const Expr *, 8> BlockLayout;
194c182
< std::map<const Decl*, CharUnits> BlockDecls;
---
> llvm::DenseMap<const Decl*, CharUnits> BlockDecls;
195a184,187
> /// BlockCXXThisOffset - The offset of the C++ 'this' value within
> /// the block structure.
> CharUnits BlockCXXThisOffset;
>