summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-02-19 06:03:53 +0000
committerAnders Carlsson <andersca@mac.com>2010-02-19 06:03:53 +0000
commit2d3d903872b8c5cf42acc40f6eae21129f2bf747 (patch)
tree08e26b02282d7786b5a43aa5fc8db3a992317f5c /clang/lib/CodeGen
parent821095085bd6281061d28528836f99b87d081d94 (diff)
downloadbcm5719-llvm-2d3d903872b8c5cf42acc40f6eae21129f2bf747.tar.gz
bcm5719-llvm-2d3d903872b8c5cf42acc40f6eae21129f2bf747.zip
Dump this-adjustments for destructors as well.
llvm-svn: 96660
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGVtable.cpp37
1 files changed, 27 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp
index 15cfc68b0b9..7491a22a7f6 100644
--- a/clang/lib/CodeGen/CGVtable.cpp
+++ b/clang/lib/CodeGen/CGVtable.cpp
@@ -1552,22 +1552,39 @@ void VtableBuilder::dumpLayout(llvm::raw_ostream& Out) {
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;
}
OpenPOWER on IntegriCloud