[cfe-commits] r65706 - in /cfe/trunk/lib: Analysis/GRExprEngine.cpp CodeGen/CGBlocks.cpp CodeGen/CodeGenFunction.h

Chris Lattner sabre at nondot.org
Sat Feb 28 11:01:03 PST 2009


Author: lattner
Date: Sat Feb 28 13:01:03 2009
New Revision: 65706

URL: http://llvm.org/viewvc/llvm-project?rev=65706&view=rev
Log:
improve compatibility with the VC++'08 C++ compiler.  Patch by
Niklas Larsson!

Modified:
    cfe/trunk/lib/Analysis/GRExprEngine.cpp
    cfe/trunk/lib/CodeGen/CGBlocks.cpp
    cfe/trunk/lib/CodeGen/CodeGenFunction.h

Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=65706&r1=65705&r2=65706&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Sat Feb 28 13:01:03 2009
@@ -1357,7 +1357,8 @@
 // Transfer function: Objective-C ivar references.
 //===----------------------------------------------------------------------===//
 
-static std::pair<const void*,const void*> EagerlyAssumeTag(&EagerlyAssumeTag,0);
+static std::pair<const void*,const void*> EagerlyAssumeTag
+  = std::pair<const void*,const void*>(&EagerlyAssumeTag,0);
 
 void GRExprEngine::EvalEagerlyAssume(NodeSet &Dst, NodeSet &Src, Expr *Ex) {
   for (NodeSet::iterator I=Src.begin(), E=Src.end(); I!=E; ++I) {

Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=65706&r1=65705&r2=65706&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Sat Feb 28 13:01:03 2009
@@ -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;

Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=65706&r1=65705&r2=65706&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Sat Feb 28 13:01:03 2009
@@ -279,7 +279,7 @@
       : BlockLiteralTy(blt), Name(n) {}
   };
 
-  llvm::Function *GenerateBlockFunction(const BlockExpr *Expr,
+  llvm::Function *GenerateBlockFunction(const BlockExpr *BExpr,
                                         const BlockInfo& Info,
                                         uint64_t &Size, uint64_t &Align,
                                         llvm::SmallVector<const Expr *, 8> &subBlockDeclRefDecls);





More information about the cfe-commits mailing list