[cfe-commits] r99793 - /cfe/trunk/lib/CodeGen/CGVtable.cpp
Anders Carlsson
andersca at mac.com
Sun Mar 28 18:38:05 PDT 2010
Author: andersca
Date: Sun Mar 28 20:38:05 2010
New Revision: 99793
URL: http://llvm.org/viewvc/llvm-project?rev=99793&view=rev
Log:
Add the thunks needed by this vtable.
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=99793&r1=99792&r2=99793&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Sun Mar 28 20:38:05 2010
@@ -3963,6 +3963,17 @@
// Add the known thunks.
Thunks.insert(Builder.thunks_begin(), Builder.thunks_end());
+ // Add the thunks needed in this vtable.
+ assert(!VTableThunksMap.count(RD) &&
+ "Thunks already exists for this vtable!");
+
+ VTableThunksTy &VTableThunks = VTableThunksMap[RD];
+ VTableThunks.append(Builder.vtable_thunks_begin(),
+ Builder.vtable_thunks_end());
+
+ // Sort them.
+ std::sort(VTableThunks.begin(), VTableThunks.end());
+
// Add the address points.
for (VtableBuilder::AddressPointsMapTy::const_iterator I =
Builder.address_points_begin(), E = Builder.address_points_end();
More information about the cfe-commits
mailing list