From 113bee05361d648adb51edd0e2ec281432d2009f Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 10 Mar 2012 09:33:50 +0000 Subject: Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr to track whether the referenced declaration comes from an enclosing local context. I'm amenable to suggestions about the exact meaning of this bit. llvm-svn: 152491 --- clang/lib/CodeGen/CodeGenFunction.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenFunction.h') diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index aeeb18c..4be5beb 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -1359,10 +1359,7 @@ public: } void AllocateBlockCXXThisPointer(const CXXThisExpr *E); - void AllocateBlockDecl(const BlockDeclRefExpr *E); - llvm::Value *GetAddrOfBlockDecl(const BlockDeclRefExpr *E) { - return GetAddrOfBlockDecl(E->getDecl(), E->isByRef()); - } + void AllocateBlockDecl(const DeclRefExpr *E); llvm::Value *GetAddrOfBlockDecl(const VarDecl *var, bool ByRef); llvm::Type *BuildByRefType(const VarDecl *var); @@ -2135,7 +2132,7 @@ public: } }; - ConstantEmission tryEmitAsConstant(ValueDecl *VD, Expr *refExpr); + ConstantEmission tryEmitAsConstant(DeclRefExpr *refExpr); RValue EmitPseudoObjectRValue(const PseudoObjectExpr *e, AggValueSlot slot = AggValueSlot::ignored()); @@ -2163,8 +2160,6 @@ public: LValue EmitLValueForBitfield(llvm::Value* Base, const FieldDecl* Field, unsigned CVRQualifiers); - LValue EmitBlockDeclRefLValue(const BlockDeclRefExpr *E); - LValue EmitCXXConstructLValue(const CXXConstructExpr *E); LValue EmitCXXBindTemporaryLValue(const CXXBindTemporaryExpr *E); LValue EmitLambdaLValue(const LambdaExpr *E); -- cgit v1.1