[cfe-commits] r90519 - /cfe/trunk/lib/CodeGen/CGVtable.cpp
Anders Carlsson
andersca at mac.com
Thu Dec 3 18:11:22 PST 2009
Author: andersca
Date: Thu Dec 3 20:11:21 2009
New Revision: 90519
URL: http://llvm.org/viewvc/llvm-project?rev=90519&view=rev
Log:
Remove the GlobalDecl from the CovariantThunk struct, we can just look it up in the Methods table now.
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=90519&r1=90518&r2=90519&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Thu Dec 3 20:11:21 2009
@@ -135,11 +135,9 @@
struct CovariantThunk {
CovariantThunk() { }
- CovariantThunk(GlobalDecl GD, CanQualType ReturnType)
- : GD(GD), ReturnType(ReturnType) { }
+ CovariantThunk(CanQualType ReturnType)
+ : ReturnType(ReturnType) { }
- GlobalDecl GD;
-
/// ReturnType - The return type of the function.
CanQualType ReturnType;
};
@@ -314,12 +312,13 @@
void InstallThunks() {
for (CovariantThunksMapTy::const_iterator i = CovariantThunks.begin(),
e = CovariantThunks.end(); i != e; ++i) {
- GlobalDecl GD = i->second.GD;
+ uint64_t Index = i->first;
+ GlobalDecl GD = Methods[Index];
+
const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
if (MD->isPure())
continue;
- uint64_t Index = i->first;
const CovariantThunk &Thunk = i->second;
assert(Index == VtableBuilder::Index[GD] && "Thunk index mismatch!");
@@ -867,8 +866,6 @@
if (Adjustment.ReturnType.isNull())
Adjustment.ReturnType =
CGM.getContext().getCanonicalType(OverriddenReturnType);
-
- Adjustment.GD = GD;
}
Methods.OverrideMethod(OGD, GD);
More information about the cfe-commits
mailing list