aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVtable.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-04 02:14:12 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-04 02:14:12 +0000
commit4644b8bb2cc11aa423d50b8b8b2874368c3a5c94 (patch)
tree9221748fa540bd9cc20f2c6effd03155697bcbca /lib/CodeGen/CGVtable.cpp
parent67f85fcdab64f36233a7211f963ed1cccffcbfb8 (diff)
Remove the GlobalDecl from the Thunk as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r--lib/CodeGen/CGVtable.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp
index 5cbeeb46a1..271558fb93 100644
--- a/lib/CodeGen/CGVtable.cpp
+++ b/lib/CodeGen/CGVtable.cpp
@@ -118,11 +118,9 @@ private:
struct Thunk {
Thunk() { }
- Thunk(GlobalDecl GD, const ThunkAdjustment &Adjustment)
- : GD(GD), Adjustment(Adjustment) { }
+ Thunk(const ThunkAdjustment &Adjustment)
+ : Adjustment(Adjustment) { }
- GlobalDecl GD;
-
/// Adjustment - The thunk adjustment.
ThunkAdjustment Adjustment;
};
@@ -351,9 +349,9 @@ public:
for (ThunksMapTy::const_iterator i = Thunks.begin(), e = Thunks.end();
i != e; ++i) {
uint64_t Index = i->first;
+ GlobalDecl GD = Methods[Index];
const Thunk& Thunk = i->second;
- GlobalDecl GD = Thunk.GD;
const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
assert(!MD->isPure() && "Can't thunk pure virtual methods!");
@@ -907,7 +905,7 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, llvm::Constant *m,
VirtualAdjustment);
if (!isPure && !ThisAdjustment.isEmpty())
- Thunks[i] = Thunk(GD, ThisAdjustment);
+ Thunks[i] = Thunk(ThisAdjustment);
return true;
}
@@ -918,7 +916,7 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, llvm::Constant *m,
ThunkAdjustment ThisAdjustment(NonVirtualAdjustment, 0);
if (!isPure)
- Thunks[i] = Thunk(GD, ThisAdjustment);
+ Thunks[i] = Thunk(ThisAdjustment);
}
return true;
}