File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
compiler/rustc_interface/src Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -1125,6 +1125,18 @@ pub(crate) fn start_codegen<'tcx>(
11251125 }
11261126 }
11271127
1128+ // This must run after monomorphization so that all generic types
1129+ // have been instantiated.
1130+ if tcx. sess . opts . unstable_opts . print_type_sizes {
1131+ tcx. sess . code_stats . print_type_sizes ( ) ;
1132+ }
1133+
1134+ if tcx. sess . opts . unstable_opts . print_vtable_sizes {
1135+ let crate_name = tcx. crate_name ( LOCAL_CRATE ) ;
1136+
1137+ tcx. sess . code_stats . print_vtable_sizes ( crate_name) ;
1138+ }
1139+
11281140 codegen
11291141}
11301142
Original file line number Diff line number Diff line change @@ -127,18 +127,6 @@ impl Linker {
127127 ) -> Linker {
128128 let ongoing_codegen = passes:: start_codegen ( codegen_backend, tcx) ;
129129
130- // This must run after monomorphization so that all generic types
131- // have been instantiated.
132- if tcx. sess . opts . unstable_opts . print_type_sizes {
133- tcx. sess . code_stats . print_type_sizes ( ) ;
134- }
135-
136- if tcx. sess . opts . unstable_opts . print_vtable_sizes {
137- let crate_name = tcx. crate_name ( LOCAL_CRATE ) ;
138-
139- tcx. sess . code_stats . print_vtable_sizes ( crate_name) ;
140- }
141-
142130 Linker {
143131 dep_graph : tcx. dep_graph . clone ( ) ,
144132 output_filenames : Arc :: clone ( tcx. output_filenames ( ( ) ) ) ,
You can’t perform that action at this time.
0 commit comments