Author: andersca
Date: Sun Mar 28 20:28:05 2010
New Revision: 99792

URL: http://llvm.org/viewvc/llvm-project?rev=99792&view=rev
Log:
Make sure to sort the vtable thunks by their vtable index :) With this we now 
pass the test from 
http://www.codesourcery.com/public/cxx-abi/abi-examples.html#vtable-ctor 
successfully.

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=99792&r1=99791&r2=99792&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Sun Mar 28 20:28:05 2010
@@ -4212,6 +4212,9 @@
   VTableThunks.append(Builder.vtable_thunks_begin(),
                       Builder.vtable_thunks_end());
 
+  // Sort them.
+  std::sort(VTableThunks.begin(), VTableThunks.end());
+
   // Create and set the initializer.
   llvm::Constant *Init = 
     CreateVTableInitializer(Base.getBase(), 


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to