]> granicus.if.org Git - clang/commitdiff
Fix an assert.
authorAnders Carlsson <andersca@mac.com>
Mon, 30 Nov 2009 19:43:26 +0000 (19:43 +0000)
committerAnders Carlsson <andersca@mac.com>
Mon, 30 Nov 2009 19:43:26 +0000 (19:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90149 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGVtable.cpp

index 9625dd296af16ed75e92b0c8a0cd932f1795276c..224c829a5b16887709b2035b4b9e4c385b518c2f 100644 (file)
@@ -867,8 +867,8 @@ void CGVtableInfo::ComputeMethodVtableIndices(const CXXRecordDecl *RD) {
   const CXXRecordDecl *PrimaryBase = Layout.getPrimaryBase();
   
   if (PrimaryBase) {
-    assert(PrimaryBase->isCanonicalDecl() && 
-           "Should have the canonical decl of the primary base!");
+    assert(PrimaryBase->isDefinition() && 
+           "Should have the definition decl of the primary base!");
 
     // Since the record decl shares its vtable pointer with the primary base
     // we need to start counting at the end of the primary base's vtable.