Move ThunkInfo as well.

llvm-svn: 99280
This commit is contained in:
Anders Carlsson 2010-03-23 15:17:13 +00:00
parent 67fd3a50dc
commit 274fc82289
2 changed files with 28 additions and 29 deletions

View File

@ -1164,34 +1164,6 @@ private:
/// currently building.
MethodInfoMapTy MethodInfoMap;
/// ThunkInfo - The 'this' pointer adjustment as well as an optional return
/// adjustment for a thunk.
struct ThunkInfo {
/// This - The 'this' pointer adjustment.
ThisAdjustment This;
/// Return - The return adjustment.
ReturnAdjustment Return;
ThunkInfo() { }
ThunkInfo(const ThisAdjustment &This, const ReturnAdjustment &Return)
: This(This), Return(Return) { }
friend bool operator==(const ThunkInfo &LHS, const ThunkInfo &RHS) {
return LHS.This == RHS.This && LHS.Return == RHS.Return;
}
friend bool operator<(const ThunkInfo &LHS, const ThunkInfo &RHS) {
if (LHS.This < RHS.This)
return true;
return LHS.This == RHS.This && LHS.Return < RHS.Return;
}
bool isEmpty() const { return This.isEmpty() && Return.isEmpty(); }
};
typedef llvm::DenseMap<uint64_t, ThunkInfo> VtableThunksMapTy;
/// VTableThunks - The thunks by vtable index in the vtable currently being

View File

@ -83,7 +83,34 @@ struct ThisAdjustment {
return LHS.NonVirtual == RHS.NonVirtual &&
LHS.VCallOffsetOffset < RHS.VCallOffsetOffset;
}
};
/// ThunkInfo - The 'this' pointer adjustment as well as an optional return
/// adjustment for a thunk.
struct ThunkInfo {
/// This - The 'this' pointer adjustment.
ThisAdjustment This;
/// Return - The return adjustment.
ReturnAdjustment Return;
ThunkInfo() { }
ThunkInfo(const ThisAdjustment &This, const ReturnAdjustment &Return)
: This(This), Return(Return) { }
friend bool operator==(const ThunkInfo &LHS, const ThunkInfo &RHS) {
return LHS.This == RHS.This && LHS.Return == RHS.Return;
}
friend bool operator<(const ThunkInfo &LHS, const ThunkInfo &RHS) {
if (LHS.This < RHS.This)
return true;
return LHS.This == RHS.This && LHS.Return < RHS.Return;
}
bool isEmpty() const { return This.isEmpty() && Return.isEmpty(); }
};
/// ThunkAdjustment - Virtual and non-virtual adjustment for thunks.