summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGVtable.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-04 05:51:56 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-04 05:51:56 +0000
commitf3935b4d4bf3579d7911722742bbf45b57c588ee (patch)
tree48719a16a18a3c25d555d8c3e8f65dbb1d388f22 /clang/lib/CodeGen/CGVtable.cpp
parentd67751766bc70759c629cc2840b3875e9b0865e1 (diff)
downloadbcm5719-llvm-f3935b4d4bf3579d7911722742bbf45b57c588ee.tar.gz
bcm5719-llvm-f3935b4d4bf3579d7911722742bbf45b57c588ee.zip
Make sure that overridden method decls are always canonical.
llvm-svn: 90542
Diffstat (limited to 'clang/lib/CodeGen/CGVtable.cpp')
-rw-r--r--clang/lib/CodeGen/CGVtable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp
index 5e448273729..869bcc0e6a6 100644
--- a/clang/lib/CodeGen/CGVtable.cpp
+++ b/clang/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)->getCanonicalDecl();
+ const CXXMethodDecl *OMD = *mi;
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)->getCanonicalDecl();
+ const CXXMethodDecl *OverriddenMD = *i;
const CXXRecordDecl *OverriddenRD = OverriddenMD->getParent();
assert(OverriddenMD->isCanonicalDecl() &&
"Should have the canonical decl of the overridden RD!");
OpenPOWER on IntegriCloud