File tree 1 file changed +3
-5
lines changed
src/librustc/middle/trans
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::*;
28
28
use middle:: ty;
29
29
use middle:: typeck;
30
30
use util:: common:: indenter;
31
- use util:: ppaux:: { Repr , ty_to_str } ;
31
+ use util:: ppaux:: Repr ;
32
32
33
33
use middle:: trans:: type_:: Type ;
34
34
35
35
use core:: vec;
36
36
use syntax:: ast_map:: { path, path_mod, path_name} ;
37
37
use syntax:: ast_util;
38
38
use syntax:: { ast, ast_map} ;
39
- use syntax:: parse:: token;
40
39
41
40
/**
42
41
The main "translation" pass for methods. Generates code
@@ -755,10 +754,9 @@ pub fn make_vtable(ccx: &mut CrateContext,
755
754
components. push( ptr)
756
755
}
757
756
758
- let name = fmt ! ( "%s_vtable_%u" , ty_to_str( ccx. tcx, tydesc. ty) , token:: gensym( "vtable" ) ) ;
759
-
760
757
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| {
762
760
llvm:: LLVMAddGlobal ( ccx. llmod , val_ty ( tbl) . to_ref ( ) , buf)
763
761
} ;
764
762
llvm:: LLVMSetInitializer ( vt_gvar, tbl) ;
You can’t perform that action at this time.
0 commit comments