[cfe-commits] r90540 - /cfe/trunk/lib/CodeGen/CGVtable.cpp
Eli Friedman
eli.friedman at gmail.com
Thu Dec 3 20:30:03 PST 2009
Author: efriedma
Date: Thu Dec 3 22:30:03 2009
New Revision: 90540
URL: http://llvm.org/viewvc/llvm-project?rev=90540&view=rev
Log:
Fix regression in vtable improvements.
Modified:
cfe/trunk/lib/CodeGen/CGVtable.cpp
Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=90540&r1=90539&r2=90540&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Thu Dec 3 22:30:03 2009
@@ -742,7 +742,7 @@
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 @@
// 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!");
More information about the cfe-commits
mailing list