]> granicus.if.org Git - clang/commitdiff
Refactor.
authorMike Stump <mrs@apple.com>
Wed, 12 Aug 2009 22:34:12 +0000 (22:34 +0000)
committerMike Stump <mrs@apple.com>
Wed, 12 Aug 2009 22:34:12 +0000 (22:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78851 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCXX.cpp

index b65c6b32db75c9146374fda56042bdf9a0432992..80781ad934d74c40960a361366d5d4b5e9caaf11 100644 (file)
@@ -699,7 +699,10 @@ void CodeGenFunction::GenerateVtableForBase(const CXXRecordDecl *RD,
     methods.push_back(rtti);
   }
 
-  if (!isPrimary && RD)
+  if (!isPrimary) {
+    if (!RD)
+      return;
+
     for (meth_iter mi = RD->method_begin(), me = RD->method_end(); mi != me;
          ++mi) {
       if (mi->isVirtual()) {
@@ -708,8 +711,8 @@ void CodeGenFunction::GenerateVtableForBase(const CXXRecordDecl *RD,
         methods.push_back(m);
       }
     }
-  if (!isPrimary)
     return;
+  }
 
   // And add the virtuals for the class to the primary vtable.
   for (meth_iter mi = Class->method_begin(), me = Class->method_end(); mi != me;