From 3385fe12ce1f25d58e069d04b06476d14d9aa0c8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 28 Feb 2009 19:01:03 +0000 Subject: improve compatibility with the VC++'08 C++ compiler. Patch by Niklas Larsson! llvm-svn: 65706 --- clang/lib/CodeGen/CGBlocks.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'clang/lib/CodeGen/CGBlocks.cpp') diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 2833b7ecb0b..696f889b634 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -472,17 +472,17 @@ llvm::Value *CodeGenFunction::LoadBlockStruct() { return Builder.CreateLoad(LocalDeclMap[getBlockStructDecl()], "self"); } -llvm::Function *CodeGenFunction::GenerateBlockFunction(const BlockExpr *Expr, +llvm::Function *CodeGenFunction::GenerateBlockFunction(const BlockExpr *BExpr, const BlockInfo& Info, uint64_t &Size, uint64_t &Align, llvm::SmallVector &subBlockDeclRefDecls) { const FunctionProtoType *FTy = - cast(Expr->getFunctionType()); + cast(BExpr->getFunctionType()); FunctionArgList Args; - const BlockDecl *BD = Expr->getBlockDecl(); + const BlockDecl *BD = BExpr->getBlockDecl(); // FIXME: This leaks ImplicitParamDecl *SelfDecl = @@ -510,9 +510,9 @@ llvm::Function *CodeGenFunction::GenerateBlockFunction(const BlockExpr *Expr, &CGM.getModule()); StartFunction(BD, FTy->getResultType(), Fn, Args, - Expr->getBody()->getLocEnd()); - EmitStmt(Expr->getBody()); - FinishFunction(cast(Expr->getBody())->getRBracLoc()); + BExpr->getBody()->getLocEnd()); + EmitStmt(BExpr->getBody()); + FinishFunction(cast(BExpr->getBody())->getRBracLoc()); // The runtime needs a minimum alignment of a void *. uint64_t MinAlign = getContext().getTypeAlign(getContext().VoidPtrTy) / 8; -- cgit v1.2.3