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 | 8c889abc1a96795e8a92f7f3f8a3b53f74c01353 (patch) | |
| tree | b6a155226e4dcdc3ddab01d58407d6355cde4f7a | |
| parent | b63051caf66fbf6eb256079960ff81b9194cbef0 (diff) | |
| download | bcm5719-llvm-8c889abc1a96795e8a92f7f3f8a3b53f74c01353.tar.gz bcm5719-llvm-8c889abc1a96795e8a92f7f3f8a3b53f74c01353.zip | |
Remove the GlobalDecl from the CovariantThunk struct, we can just look it up in the Methods table now.
llvm-svn: 90519
| -rw-r--r-- | clang/lib/CodeGen/CGVtable.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp index b8860841ab3..5cbeeb46a1b 100644 --- a/clang/lib/CodeGen/CGVtable.cpp +++ b/clang/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); |

