commit | aed924e9f210169c9a5b0ca30099fd2f479f2637 | [log] [tgz] |
---|---|---|
author | Anders Carlsson <andersca@mac.com> | Mon Mar 29 01:28:05 2010 +0000 |
committer | Anders Carlsson <andersca@mac.com> | Mon Mar 29 01:28:05 2010 +0000 |
tree | dd68f5589c4740c38384fc790b94fe140c170a2d | |
parent | 14da9de3ad9a451ed58f0196eea945c8393d5762 [diff] |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99792 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index 804c684..1c94a4e 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp
@@ -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(),