diff options
| author | Mike Stump <mrs@apple.com> | 2009-11-03 19:03:17 +0000 |
|---|---|---|
| committer | Mike Stump <mrs@apple.com> | 2009-11-03 19:03:17 +0000 |
| commit | 4627132ebc47d1ceb0a047f858e503f116dc1d85 (patch) | |
| tree | d5f99b486dc85b111ce2b3b15ee7d7f73bddf0d2 /clang/lib/CodeGen/CGVtable.cpp | |
| parent | 76a4774a0dedaf0c71e260c7a61895501ca2cb99 (diff) | |
| download | bcm5719-llvm-4627132ebc47d1ceb0a047f858e503f116dc1d85.tar.gz bcm5719-llvm-4627132ebc47d1ceb0a047f858e503f116dc1d85.zip | |
Refine codegen for covariant thunks that return references.
llvm-svn: 85916
Diffstat (limited to 'clang/lib/CodeGen/CGVtable.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGVtable.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp index 39803306709..e2e11478de2 100644 --- a/clang/lib/CodeGen/CGVtable.cpp +++ b/clang/lib/CodeGen/CGVtable.cpp @@ -159,8 +159,8 @@ public: /// getNVOffset - Returns the non-virtual offset for the given (B) base of the /// derived class D. Index_t getNVOffset(QualType qB, QualType qD) { - qD = qD->getAs<PointerType>()->getPointeeType(); - qB = qB->getAs<PointerType>()->getPointeeType(); + qD = qD->getPointeeType(); + qB = qB->getPointeeType(); CXXRecordDecl *D = cast<CXXRecordDecl>(qD->getAs<RecordType>()->getDecl()); CXXRecordDecl *B = cast<CXXRecordDecl>(qB->getAs<RecordType>()->getDecl()); int64_t o = getNVOffset_1(D, B); @@ -174,8 +174,8 @@ public: /// getVbaseOffset - Returns the index into the vtable for the virtual base /// offset for the given (B) virtual base of the derived class D. Index_t getVbaseOffset(QualType qB, QualType qD) { - qD = qD->getAs<PointerType>()->getPointeeType(); - qB = qB->getAs<PointerType>()->getPointeeType(); + qD = qD->getPointeeType(); + qB = qB->getPointeeType(); CXXRecordDecl *D = cast<CXXRecordDecl>(qD->getAs<RecordType>()->getDecl()); CXXRecordDecl *B = cast<CXXRecordDecl>(qB->getAs<RecordType>()->getDecl()); if (D != Class) |

