diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-03 02:03:29 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-03 02:03:29 +0000 |
commit | bdd8e38385f2d2accd4b0acf98a280525990cb6c (patch) | |
tree | b38b9009e41020cfa33ce86822caa377fe189330 /lib/CodeGen/CGVtable.cpp | |
parent | d8ddffc6d129a2b76639042bb1b581fd742f81ec (diff) |
Store a GlobalDecl in the return adjustment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90387 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index 58d9a552a2..be9c85ad44 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -81,7 +81,8 @@ private: CovariantThunk() : Index(0) { } - CovariantThunk(uint64_t Index, const ThunkAdjustment &ReturnAdjustment, + CovariantThunk(uint64_t Index, GlobalDecl GD, + const ThunkAdjustment &ReturnAdjustment, CanQualType ReturnType) : Index(Index), ReturnAdjustment(ReturnAdjustment), ReturnType(ReturnType) { } @@ -89,6 +90,8 @@ private: // Index - The index in the vtable. uint64_t Index; + GlobalDecl GD; + /// ReturnAdjustment - The covariant thunk return adjustment. ThunkAdjustment ReturnAdjustment; @@ -290,7 +293,7 @@ public: CGM.BuildCovariantThunk(MD, Extern, Adjustment); } CovariantThunks.clear(); - + for (ThunksMapTy::const_iterator i = Thunks.begin(), e = Thunks.end(); i != e; ++i) { GlobalDecl GD = i->first; @@ -762,7 +765,7 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, llvm::Constant *m, // FIXME: Do we always have to build a covariant thunk to save oret, // which is the containing virtual base class? if (!ReturnAdjustment.isEmpty()) - CovariantThunks[GD] = CovariantThunk(i, ReturnAdjustment, oret); + CovariantThunks[GD] = CovariantThunk(i, GD, ReturnAdjustment, oret); if (!isPure && !ThisAdjustment.isEmpty()) Thunks[GD] = Thunk(i, ThisAdjustment); @@ -777,7 +780,7 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, llvm::Constant *m, if (!ReturnAdjustment.isEmpty()) CovariantThunks[GD] = - CovariantThunk(i, ReturnAdjustment, oret); + CovariantThunk(i, GD, ReturnAdjustment, oret); if (!isPure) Thunks[GD] = Thunk(i, ThisAdjustment); |