[cfe-commits] r98239 - /cfe/trunk/lib/CodeGen/CGVtable.cpp

Anders Carlsson andersca at mac.com
Wed Mar 10 21:48:21 PST 2010


Author: andersca
Date: Wed Mar 10 23:48:21 2010
New Revision: 98239

URL: http://llvm.org/viewvc/llvm-project?rev=98239&view=rev
Log:
Run the new vtable builder for construction vtables as well now. Note that we still don't use the data it generates.

Modified:
    cfe/trunk/lib/CodeGen/CGVtable.cpp

Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=98239&r1=98238&r2=98239&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Wed Mar 10 23:48:21 2010
@@ -3429,20 +3429,17 @@
   if (GenerateDefinition) {
     if (LayoutClass == RD) {
       assert(!IsVirtual && 
-             "Can't only have a virtual base in construction vtables!");
-      VtableBuilder Builder(*this, RD, Offset, 
-                            /*MostDerivedClassIsVirtual=*/false,
-                            LayoutClass);
-
-      if (CGM.getLangOptions().DumpVtableLayouts)
-        Builder.dumpLayout(llvm::errs());
-    } else if (CGM.getLangOptions().DumpVtableLayouts) {
-      // We only build construction vtables when dumping vtable layouts for now.
-      VtableBuilder Builder(*this, RD, Offset, 
-                            /*MostDerivedClassIsVirtual=*/IsVirtual,
-                            LayoutClass);
-      Builder.dumpLayout(llvm::errs());
+             "Can only have a virtual base in construction vtables!");
+      assert(!Offset && 
+             "Can only have a base offset in construction vtables!");
     }
+    
+    VtableBuilder Builder(*this, RD, Offset, 
+                          /*MostDerivedClassIsVirtual=*/false,
+                          LayoutClass);
+
+    if (CGM.getLangOptions().DumpVtableLayouts)
+      Builder.dumpLayout(llvm::errs());
   }
 
   llvm::SmallString<256> OutName;





More information about the cfe-commits mailing list