]> granicus.if.org Git - clang/commitdiff
Make sure to insert the primary base in the set :)
authorAnders Carlsson <andersca@mac.com>
Sat, 27 Feb 2010 19:51:04 +0000 (19:51 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 27 Feb 2010 19:51:04 +0000 (19:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97339 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGVtable.cpp

index b7f8fe77ea576725f055c0e1be2143e2cbc4cb93..d5d22154d916b091bf26027c7c49fa0fef2f6836 100644 (file)
@@ -1512,6 +1512,9 @@ VtableBuilder::IsOverriderUsed(BaseSubobject Base,
              "Primary base should always be at offset 0!");
     }
     
+    if (!PrimaryBases.insert(PrimaryBase))
+      assert(false && "Found a duplicate primary base!");
+
     RD = PrimaryBase;
   }