Refactor some bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78254 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 375c9ac..5324cc6 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -661,7 +661,7 @@
   }
 
   // Initialize the vtable pointer
-  if (ClassDecl->isPolymorphic() || ClassDecl->getNumVBases()) {
+  if (ClassDecl->isDynamicClass()) {
     if (!LoadOfThis)
       LoadOfThis = LoadCXXThis();
     llvm::Value *VtableField;