diff options
author | Anders Carlsson <andersca@mac.com> | 2010-04-24 21:23:59 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-04-24 21:23:59 +0000 |
commit | a04efdf635d35d88e65041fad007225d8c8d64a5 (patch) | |
tree | b9cd260254b453cbc2cc5be2cb6f726e6dfb4b95 /lib/CodeGen/CGExpr.cpp | |
parent | fc89c31a329eb6b36c6dbd8b7cb945d1a831650e (diff) |
Change CodeGenFunction::GetAddressOfDerivedClass to take a BasePath.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 62b5a3dbee..5c9374dd29 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1693,11 +1693,6 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) { case CastExpr::CK_ToUnion: return EmitAggExprToLValue(E); case CastExpr::CK_BaseToDerived: { - const RecordType *BaseClassTy = - E->getSubExpr()->getType()->getAs<RecordType>(); - CXXRecordDecl *BaseClassDecl = - cast<CXXRecordDecl>(BaseClassTy->getDecl()); - const RecordType *DerivedClassTy = E->getType()->getAs<RecordType>(); CXXRecordDecl *DerivedClassDecl = cast<CXXRecordDecl>(DerivedClassTy->getDecl()); @@ -1706,8 +1701,8 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) { // Perform the base-to-derived conversion llvm::Value *Derived = - GetAddressOfDerivedClass(LV.getAddress(), BaseClassDecl, - DerivedClassDecl, /*NullCheckValue=*/false); + GetAddressOfDerivedClass(LV.getAddress(), DerivedClassDecl, + E->getBasePath(),/*NullCheckValue=*/false); return LValue::MakeAddr(Derived, MakeQualifiers(E->getType())); } |