@@ -46,7 +46,7 @@ use std::rc::Rc;
4646use syntax;
4747use syntax:: util:: interner:: Interner ;
4848use syntax:: codemap:: Span ;
49- use syntax:: { ast, codemap} ;
49+ use syntax:: { ast, ast_util , codemap} ;
5050use syntax:: parse:: token;
5151
5252
@@ -932,26 +932,17 @@ fn basic_type_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
932932
933933 let ( name, encoding) = match t. sty {
934934 ty:: TyTuple ( ref elements) if elements. is_empty ( ) =>
935- ( "()" . to_string ( ) , DW_ATE_unsigned ) ,
936- ty:: TyBool => ( "bool" . to_string ( ) , DW_ATE_boolean ) ,
937- ty:: TyChar => ( "char" . to_string ( ) , DW_ATE_unsigned_char ) ,
938- ty:: TyInt ( int_ty) => match int_ty {
939- ast:: TyIs => ( "isize" . to_string ( ) , DW_ATE_signed ) ,
940- ast:: TyI8 => ( "i8" . to_string ( ) , DW_ATE_signed ) ,
941- ast:: TyI16 => ( "i16" . to_string ( ) , DW_ATE_signed ) ,
942- ast:: TyI32 => ( "i32" . to_string ( ) , DW_ATE_signed ) ,
943- ast:: TyI64 => ( "i64" . to_string ( ) , DW_ATE_signed )
935+ ( "()" , DW_ATE_unsigned ) ,
936+ ty:: TyBool => ( "bool" , DW_ATE_boolean ) ,
937+ ty:: TyChar => ( "char" , DW_ATE_unsigned_char ) ,
938+ ty:: TyInt ( int_ty) => {
939+ ( ast_util:: int_ty_to_string ( int_ty) , DW_ATE_signed )
944940 } ,
945- ty:: TyUint ( uint_ty) => match uint_ty {
946- ast:: TyUs => ( "usize" . to_string ( ) , DW_ATE_unsigned ) ,
947- ast:: TyU8 => ( "u8" . to_string ( ) , DW_ATE_unsigned ) ,
948- ast:: TyU16 => ( "u16" . to_string ( ) , DW_ATE_unsigned ) ,
949- ast:: TyU32 => ( "u32" . to_string ( ) , DW_ATE_unsigned ) ,
950- ast:: TyU64 => ( "u64" . to_string ( ) , DW_ATE_unsigned )
941+ ty:: TyUint ( uint_ty) => {
942+ ( ast_util:: uint_ty_to_string ( uint_ty) , DW_ATE_unsigned )
951943 } ,
952- ty:: TyFloat ( float_ty) => match float_ty {
953- ast:: TyF32 => ( "f32" . to_string ( ) , DW_ATE_float ) ,
954- ast:: TyF64 => ( "f64" . to_string ( ) , DW_ATE_float ) ,
944+ ty:: TyFloat ( float_ty) => {
945+ ( ast_util:: float_ty_to_string ( float_ty) , DW_ATE_float )
955946 } ,
956947 _ => cx. sess ( ) . bug ( "debuginfo::basic_type_metadata - t is invalid type" )
957948 } ;
0 commit comments