Improve dumping of thunks.

llvm-svn: 99181
This commit is contained in:
Anders Carlsson 2010-03-22 16:10:59 +00:00
parent 38da2b015f
commit 53a47bf901
1 changed files with 16 additions and 3 deletions

View File

@ -2306,14 +2306,27 @@ void VtableBuilder::dumpLayout(llvm::raw_ostream& Out) {
Out << llvm::format("%4d | ", I);
// If this function pointer has a return pointer adjustment, dump it.
if (!Thunk.Return.isEmpty()) {
Out << "return adjustment: " << Thunk.This.NonVirtual;
Out << " non-virtual";
if (Thunk.Return.VBaseOffsetOffset) {
Out << ", " << Thunk.Return.VBaseOffsetOffset;
Out << " vbase offset offset";
}
if (!Thunk.This.isEmpty())
Out << "\n ";
}
// If this function pointer has a 'this' pointer adjustment, dump it.
if (!Thunk.This.isEmpty()) {
Out << "this: ";
Out << Thunk.This.NonVirtual << " nv";
Out << "this adjustment: ";
Out << Thunk.This.NonVirtual << " non-virtual";
if (Thunk.This.VCallOffsetOffset) {
Out << ", " << Thunk.This.VCallOffsetOffset;
Out << " v";
Out << " vcall offset offset";
}
}