aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVTables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGVTables.cpp')
-rw-r--r--lib/CodeGen/CGVTables.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp
index 44ac56a0aa..c753ce20a8 100644
--- a/lib/CodeGen/CGVTables.cpp
+++ b/lib/CodeGen/CGVTables.cpp
@@ -1000,6 +1000,9 @@ public:
Overriders(MostDerivedClass, MostDerivedClassOffset, LayoutClass) {
LayoutVTable();
+
+ if (Context.getLangOptions().DumpVTableLayouts)
+ dumpLayout(llvm::errs());
}
uint64_t getNumThunks() const {
@@ -3021,14 +3024,6 @@ void
CodeGenVTables::EmitVTableDefinition(llvm::GlobalVariable *VTable,
llvm::GlobalVariable::LinkageTypes Linkage,
const CXXRecordDecl *RD) {
- // Dump the vtable layout if necessary.
- if (CGM.getLangOptions().DumpVTableLayouts) {
- VTableBuilder Builder(VTContext, RD, CharUnits::Zero(),
- /*MostDerivedClassIsVirtual=*/0, RD);
-
- Builder.dumpLayout(llvm::errs());
- }
-
const VTableLayout &VTLayout = VTContext.getVTableLayout(RD);
// Create and set the initializer.
@@ -3057,10 +3052,6 @@ CodeGenVTables::GenerateConstructionVTable(const CXXRecordDecl *RD,
Base.getBaseOffset(),
/*MostDerivedClassIsVirtual=*/BaseIsVirtual, RD);
- // Dump the vtable layout if necessary.
- if (CGM.getLangOptions().DumpVTableLayouts)
- Builder.dumpLayout(llvm::errs());
-
// Add the address points.
AddressPoints.insert(Builder.address_points_begin(),
Builder.address_points_end());