File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/librustc/middle/trans Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -28,15 +28,14 @@ use middle::trans::type_of::*;
2828use middle:: ty;
2929use middle:: typeck;
3030use util:: common:: indenter;
31- use util:: ppaux:: { Repr , ty_to_str } ;
31+ use util:: ppaux:: Repr ;
3232
3333use middle:: trans:: type_:: Type ;
3434
3535use core:: vec;
3636use syntax:: ast_map:: { path, path_mod, path_name} ;
3737use syntax:: ast_util;
3838use syntax:: { ast, ast_map} ;
39- use syntax:: parse:: token;
4039
4140/**
4241The main "translation" pass for methods. Generates code
@@ -755,10 +754,9 @@ pub fn make_vtable(ccx: &mut CrateContext,
755754 components. push( ptr)
756755 }
757756
758- let name = fmt ! ( "%s_vtable_%u" , ty_to_str( ccx. tcx, tydesc. ty) , token:: gensym( "vtable" ) ) ;
759-
760757 let tbl = C_struct ( components) ;
761- let vt_gvar = do name. as_c_str |buf| {
758+ let vtable = ccx. sess . str_of ( gensym_name ( "vtable" ) ) ;
759+ let vt_gvar = do vtable. as_c_str |buf| {
762760 llvm:: LLVMAddGlobal ( ccx. llmod , val_ty ( tbl) . to_ref ( ) , buf)
763761 } ;
764762 llvm:: LLVMSetInitializer ( vt_gvar, tbl) ;
You can’t perform that action at this time.
0 commit comments