@@ -30,7 +30,6 @@ use trans::callee;
3030use  trans:: cleanup; 
3131use  trans:: cleanup:: CleanupMethods ; 
3232use  trans:: common:: * ; 
33- use  trans:: consts; 
3433use  trans:: datum; 
3534use  trans:: debuginfo:: DebugLoc ; 
3635use  trans:: declare; 
@@ -39,8 +38,7 @@ use trans::foreign;
3938use  trans:: inline; 
4039use  trans:: machine:: * ; 
4140use  trans:: monomorphize; 
42- use  trans:: tvec; 
43- use  trans:: type_of:: { type_of,  sizing_type_of,  align_of} ; 
41+ use  trans:: type_of:: { type_of,  type_of_dtor,  sizing_type_of,  align_of} ; 
4442use  trans:: type_:: Type ; 
4543use  util:: ppaux; 
4644use  util:: ppaux:: { ty_to_short_str,  Repr } ; 
@@ -191,8 +189,9 @@ pub fn get_drop_glue<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>) -> Val
191189    } ; 
192190
193191    let  fn_nm = mangle_internal_name_by_type_and_seq ( ccx,  t,  "drop" ) ; 
194-     let  llfn = decl_cdecl_fn ( ccx,  & fn_nm,  llfnty,  ty:: mk_nil ( ccx. tcx ( ) ) ) ; 
195-     note_unique_llvm_symbol ( ccx,  fn_nm. clone ( ) ) ; 
192+     let  llfn = declare:: define_cfn ( ccx,  & fn_nm,  llfnty,  ty:: mk_nil ( ccx. tcx ( ) ) ) . unwrap_or_else ( ||{ 
193+        ccx. sess ( ) . bug ( & format ! ( "symbol `{}` already defined" ,  fn_nm) ) ; 
194+     } ) ; 
196195    ccx. available_drop_glues ( ) . borrow_mut ( ) . insert ( t,  fn_nm) ; 
197196
198197    let  _s = StatRecorder :: new ( ccx,  format ! ( "drop {}" ,  ty_to_short_str( ccx. tcx( ) ,  t) ) ) ; 
0 commit comments