diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-04 02:11:21 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-04 02:11:21 +0000 |
commit | c71a5234c0277f64eb07b99d3e9dc862dffb057f (patch) | |
tree | b9df8baa2691d44248fb40eab2eb9bcc8d90aede /lib/CodeGen/CGVtable.cpp | |
parent | a7f1911db2ec8c203f6d9ccf3206e0ba1738433e (diff) |
Remove the GlobalDecl from the CovariantThunk struct, we can just look it up in the Methods table now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90519 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index b8860841ab..5cbeeb46a1 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -135,11 +135,9 @@ private: 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 @@ public: 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 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, llvm::Constant *m, if (Adjustment.ReturnType.isNull()) Adjustment.ReturnType = CGM.getContext().getCanonicalType(OverriddenReturnType); - - Adjustment.GD = GD; } Methods.OverrideMethod(OGD, GD); |