silence warning in a cleaner way

llvm-svn: 96520
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp
index f5bd33e..fbe4742 100644
--- a/clang/lib/CodeGen/CGVtable.cpp
+++ b/clang/lib/CodeGen/CGVtable.cpp
@@ -1205,8 +1205,7 @@
   
 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;