diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-04 04:30:03 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-04 04:30:03 +0000 |
commit | 8b9006f4e86b51a812f57f3d402094eda61b147e (patch) | |
tree | c5dd39106280a74ba2f40a42059343e85ba10f52 /lib | |
parent | fffefeb8ecafa1e1a191a276361fd5acaa0f8c5e (diff) |
Fix regression in vtable improvements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90540 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index 869bcc0e6a..5e44827372 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -742,7 +742,7 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, llvm::Constant *m, mi != e; ++mi) { GlobalDecl OGD; - const CXXMethodDecl *OMD = *mi; + const CXXMethodDecl *OMD = (*mi)->getCanonicalDecl(); if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(OMD)) OGD = GlobalDecl(DD, GD.getDtorType()); else @@ -933,7 +933,7 @@ void CGVtableInfo::ComputeMethodVtableIndices(const CXXRecordDecl *RD) { // Check if this method overrides a method in the primary base. for (CXXMethodDecl::method_iterator i = MD->begin_overridden_methods(), e = MD->end_overridden_methods(); i != e; ++i) { - const CXXMethodDecl *OverriddenMD = *i; + const CXXMethodDecl *OverriddenMD = (*i)->getCanonicalDecl(); const CXXRecordDecl *OverriddenRD = OverriddenMD->getParent(); assert(OverriddenMD->isCanonicalDecl() && "Should have the canonical decl of the overridden RD!"); |