From 6fd247bf89707fd79597408432b1e4b01a56f615 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Thu, 3 Dec 2009 02:36:40 +0000 Subject: [PATCH] Add the global decl to the Thunk struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90398 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGVtable.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index e6b63836f8..389373e215 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -62,12 +62,14 @@ private: Thunk() : Index(0) { } - Thunk(uint64_t Index, const ThunkAdjustment &Adjustment) - : Index(Index), Adjustment(Adjustment) { } + Thunk(uint64_t Index, GlobalDecl GD, const ThunkAdjustment &Adjustment) + : Index(Index), GD(GD), Adjustment(Adjustment) { } /// Index - The index in the vtable. uint64_t Index; - + + GlobalDecl GD; + /// Adjustment - The thunk adjustment. ThunkAdjustment Adjustment; }; @@ -847,7 +849,7 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, llvm::Constant *m, VirtualAdjustment); if (!isPure && !ThisAdjustment.isEmpty()) - Thunks[GD] = Thunk(i, ThisAdjustment); + Thunks[GD] = Thunk(i, GD, ThisAdjustment); return true; } @@ -858,7 +860,7 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, llvm::Constant *m, ThunkAdjustment ThisAdjustment(NonVirtualAdjustment, 0); if (!isPure) - Thunks[GD] = Thunk(i, ThisAdjustment); + Thunks[GD] = Thunk(i, GD, ThisAdjustment); } return true; } -- 2.40.0