[cfe-commits] r96660 - /cfe/trunk/lib/CodeGen/CGVtable.cpp
Anders Carlsson
andersca at mac.com
Thu Feb 18 22:03:53 PST 2010
Author: andersca
Date: Fri Feb 19 00:03:53 2010
New Revision: 96660
URL: http://llvm.org/viewvc/llvm-project?rev=96660&view=rev
Log:
Dump this-adjustments for destructors as well.
Modified:
cfe/trunk/lib/CodeGen/CGVtable.cpp
Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=96660&r1=96659&r2=96660&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Fri Feb 19 00:03:53 2010
@@ -1552,22 +1552,39 @@
break;
}
- case VtableComponent::CK_CompleteDtorPointer: {
+ case VtableComponent::CK_CompleteDtorPointer:
+ case VtableComponent::CK_DeletingDtorPointer: {
+ bool IsComplete =
+ Component.getKind() == VtableComponent::CK_CompleteDtorPointer;
+
const CXXDestructorDecl *DD = Component.getDestructorDecl();
- Out << DD->getQualifiedNameAsString() << "() [complete]";
+ Out << DD->getQualifiedNameAsString();
+ if (IsComplete)
+ Out << "() [complete]";
+ else
+ Out << "() [deleting]";
+
if (DD->isPure())
Out << " [pure]";
- break;
- }
+ // If this destructor has a 'this' pointer adjustment, dump it.
+ if (NextThisAdjustmentIndex < ThisAdjustments.size() &&
+ ThisAdjustments[NextThisAdjustmentIndex].first == I) {
+ const ThisAdjustment Adjustment =
+ ThisAdjustments[NextThisAdjustmentIndex].second;
+
+ Out << "\n [this adjustment: ";
+ Out << Adjustment.NonVirtual << " non-virtual";
+
+ if (Adjustment.VCallOffsetOffset)
+ Out << ", " << Adjustment.VCallOffsetOffset << " vcall offset offset";
+
+ Out << ']';
+
+ NextThisAdjustmentIndex++;
+ }
- case VtableComponent::CK_DeletingDtorPointer: {
- const CXXDestructorDecl *DD = Component.getDestructorDecl();
-
- Out << DD->getQualifiedNameAsString() << "() [deleting]";
- if (DD->isPure())
- Out << " [pure]";
break;
}
More information about the cfe-commits
mailing list