]> granicus.if.org Git - clang/commitdiff
Make sure to sort the vtable thunks by their vtable index :) With this we now pass...
authorAnders Carlsson <andersca@mac.com>
Mon, 29 Mar 2010 01:28:05 +0000 (01:28 +0000)
committerAnders Carlsson <andersca@mac.com>
Mon, 29 Mar 2010 01:28:05 +0000 (01:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99792 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGVtable.cpp

index 804c68436186d2f3f4c3641046135794b3c595ca..1c94a4e73e99e7f2728bbdef7b73bc260e3f7d1b 100644 (file)
@@ -4212,6 +4212,9 @@ CodeGenVTables::GenerateConstructionVTable(const CXXRecordDecl *RD,
   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(),