mirror of
https://github.com/intel/llvm.git
synced 2026-02-01 17:07:36 +08:00
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.
llvm-svn: 99792
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user