When null-initializing bases with data member pointers, don't assert on virtual bases. Just initialize them to null.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104868 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 551a47a..978964d 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -1009,7 +1009,11 @@
     // Go through all bases and fill in any null pointer to data members.
     for (CXXRecordDecl::base_class_const_iterator I = RD->bases_begin(),
          E = RD->bases_end(); I != E; ++I) {
-      assert(!I->isVirtual() && "Should not see virtual bases here!");
+      if (I->isVirtual()) {
+        // FIXME: We should initialize null pointer to data members in virtual
+        // bases here.
+        continue;
+      }
       
       const CXXRecordDecl *BaseDecl = 
       cast<CXXRecordDecl>(I->getType()->getAs<RecordType>()->getDecl());
@@ -1088,7 +1092,11 @@
     // Go through all bases and fill in any null pointer to data members.
     for (CXXRecordDecl::base_class_const_iterator I = RD->bases_begin(),
          E = RD->bases_end(); I != E; ++I) {
-      assert(!I->isVirtual() && "Should not see virtual bases here!");
+      if (I->isVirtual()) {
+        // FIXME: We should initialize null pointer to data members in virtual
+        // bases here.
+        continue;
+      }
 
       const CXXRecordDecl *BaseDecl = 
         cast<CXXRecordDecl>(I->getType()->getAs<RecordType>()->getDecl());