improve compatibility with the VC++'08 C++ compiler. Patch by
Niklas Larsson!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65706 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index 2833b7e..696f889 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -472,17 +472,17 @@
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<const Expr *, 8> &subBlockDeclRefDecls) {
const FunctionProtoType *FTy =
- cast<FunctionProtoType>(Expr->getFunctionType());
+ cast<FunctionProtoType>(BExpr->getFunctionType());
FunctionArgList Args;
- const BlockDecl *BD = Expr->getBlockDecl();
+ const BlockDecl *BD = BExpr->getBlockDecl();
// FIXME: This leaks
ImplicitParamDecl *SelfDecl =
@@ -510,9 +510,9 @@
&CGM.getModule());
StartFunction(BD, FTy->getResultType(), Fn, Args,
- Expr->getBody()->getLocEnd());
- EmitStmt(Expr->getBody());
- FinishFunction(cast<CompoundStmt>(Expr->getBody())->getRBracLoc());
+ BExpr->getBody()->getLocEnd());
+ EmitStmt(BExpr->getBody());
+ FinishFunction(cast<CompoundStmt>(BExpr->getBody())->getRBracLoc());
// The runtime needs a minimum alignment of a void *.
uint64_t MinAlign = getContext().getTypeAlign(getContext().VoidPtrTy) / 8;