diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2009-07-29 18:40:24 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-07-29 18:40:24 +0000 |
| commit | 98a541e80848d3b7d1131237ac04e698faffd151 (patch) | |
| tree | 80af2e9ff7e3c1648ea83f11e16ac210131f4d86 /lib/CodeGen/CGExpr.cpp | |
| parent | d99cbe66403ee39c2ee58024b9582b95649a4fc5 (diff) | |
| download | clang-98a541e80848d3b7d1131237ac04e698faffd151.tar.gz clang-98a541e80848d3b7d1131237ac04e698faffd151.tar.bz2 clang-98a541e80848d3b7d1131237ac04e698faffd151.tar.xz | |
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
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | lib/CodeGen/CGExpr.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
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<FieldDecl>(E->getMemberDecl()); - if (const CXXRecordDecl *BaseClassDecl = - dyn_cast<CXXRecordDecl>(Field->getDeclContext())) - BaseValue = AddressCXXOfBaseClass(BaseValue, ClassDecl, BaseClassDecl); - } } else if (isa<ObjCPropertyRefExpr>(BaseExpr) || isa<ObjCKVCRefExpr>(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<CXXRecordDecl>( - BaseTy->getAsRecordType()->getDecl())) { - FieldDecl *Field = dyn_cast<FieldDecl>(E->getMemberDecl()); - if (const CXXRecordDecl *BaseClassDecl = - dyn_cast<CXXRecordDecl>(Field->getDeclContext())) - BaseValue = - AddressCXXOfBaseClass(BaseValue, ClassDecl, BaseClassDecl); - } } FieldDecl *Field = dyn_cast<FieldDecl>(E->getMemberDecl()); |
