From 98a541e80848d3b7d1131237ac04e698faffd151 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 29 Jul 2009 18:40:24 +0000 Subject: Patch to provide cast of objects in member access excpression, if needed, and remove some ir-gen code now unnencessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77490 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 39ef799cd3..bf3a0ae8c6 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -993,13 +993,6 @@ LValue CodeGenFunction::EmitMemberExpr(const MemberExpr *E) { if (PTy->getPointeeType()->isUnionType()) isUnion = true; CVRQualifiers = PTy->getPointeeType().getCVRQualifiers(); - if (const CXXRecordDecl *ClassDecl = - BaseExpr->getType()->getCXXRecordDeclForPointerType()) { - FieldDecl *Field = dyn_cast(E->getMemberDecl()); - if (const CXXRecordDecl *BaseClassDecl = - dyn_cast(Field->getDeclContext())) - BaseValue = AddressCXXOfBaseClass(BaseValue, ClassDecl, BaseClassDecl); - } } else if (isa(BaseExpr) || isa(BaseExpr)) { RValue RV = EmitObjCPropertyGet(BaseExpr); @@ -1019,15 +1012,6 @@ LValue CodeGenFunction::EmitMemberExpr(const MemberExpr *E) { if (BaseTy->isUnionType()) isUnion = true; CVRQualifiers = BaseTy.getCVRQualifiers(); - if (const CXXRecordDecl *ClassDecl = - dyn_cast( - BaseTy->getAsRecordType()->getDecl())) { - FieldDecl *Field = dyn_cast(E->getMemberDecl()); - if (const CXXRecordDecl *BaseClassDecl = - dyn_cast(Field->getDeclContext())) - BaseValue = - AddressCXXOfBaseClass(BaseValue, ClassDecl, BaseClassDecl); - } } FieldDecl *Field = dyn_cast(E->getMemberDecl()); -- cgit v1.2.3