commit | 848d86e5c4e2d2e26778e98af10cb8f48823adac | [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 | 563dc17d5e2be5b8ef090b2806a1df7bb1623544 | |
parent | 948d3f4ec6fa9cfc0e6d828ec1ff7b89d0f54c07 [diff] [blame] |
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
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp index 804c6843..1c94a4e 100644 --- a/clang/lib/CodeGen/CGVtable.cpp +++ b/clang/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(),