]> granicus.if.org Git - clang/commitdiff
silence warning in a cleaner way
authorChris Lattner <sabre@nondot.org>
Wed, 17 Feb 2010 21:42:34 +0000 (21:42 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 17 Feb 2010 21:42:34 +0000 (21:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96520 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGVtable.cpp

index f5bd33e548fc7d725f6805ff5455bf1120c2addd..fbe4742455517c0aa9a4f35e32bbf5fb4beea81f 100644 (file)
@@ -1205,8 +1205,7 @@ void VtableBuilder::LayoutVtable() {
   
 void VtableBuilder::LayoutPrimaryAndAndSecondaryVtables(BaseSubobject Base,
                                                         bool BaseIsVirtual) {
-  const CXXRecordDecl *RD ATTRIBUTE_UNUSED = Base.getBase();
-  assert(RD->isDynamicClass() && "class does not have a vtable!");
+  assert(Base.getBase()->isDynamicClass() && "class does not have a vtable!");
 
   // Add vcall and vbase offsets for this vtable.
   VisitedVirtualBasesSetTy VBases;