[cfe-commits] r99800 - /cfe/trunk/lib/CodeGen/CGClass.cpp

Anders Carlsson andersca at mac.com
Sun Mar 28 19:38:51 PDT 2010


Author: andersca
Date: Sun Mar 28 21:38:51 2010
New Revision: 99800

URL: http://llvm.org/viewvc/llvm-project?rev=99800&view=rev
Log:
Flip the switch to always get vtables from the VTT when necessary, I've verified that clang bootstraps with this.

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

Modified: cfe/trunk/lib/CodeGen/CGClass.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGClass.cpp?rev=99800&r1=99799&r2=99800&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGClass.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGClass.cpp Sun Mar 28 21:38:51 2010
@@ -1565,12 +1565,9 @@
 
   // Compute the address point.
   llvm::Value *VTableAddressPoint;
-  
-  // FIXME: Always use the new vtable code once we know it works.
-  bool UseNewVTableCode = CGM.getLangOptions().DumpVtableLayouts;
-  
+
   // Check if we need to use a vtable from the VTT.
-  if (UseNewVTableCode && CodeGenVTables::needsVTTParameter(CurGD) &&
+  if (CodeGenVTables::needsVTTParameter(CurGD) &&
       (RD->getNumVBases() || BaseIsMorallyVirtual)) {
     // Get the secondary vpointer index.
     uint64_t VirtualPointerIndex = 
@@ -1592,8 +1589,7 @@
   // Compute where to store the address point.
   llvm::Value *VTableField;
   
-  if (UseNewVTableCode && 
-      CodeGenVTables::needsVTTParameter(CurGD) && BaseIsMorallyVirtual) {
+  if (CodeGenVTables::needsVTTParameter(CurGD) && BaseIsMorallyVirtual) {
     // We need to use the virtual base offset offset because the virtual base
     // might have a different offset in the most derived class.
     VTableField = GetAddressOfBaseClass(LoadCXXThis(), VTableClass, RD, 





More information about the cfe-commits mailing list