From 8a5dccde2adca594db2ecd684484410139842c29 Mon Sep 17 00:00:00 2001 From: varkor Date: Wed, 22 Aug 2018 01:35:55 +0100 Subject: Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str} --- src/librustc_codegen_llvm/debuginfo/metadata.rs | 24 +++++++++++------------ src/librustc_codegen_llvm/debuginfo/type_names.rs | 12 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src/librustc_codegen_llvm/debuginfo') diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs index 670b7e1fdab..c7a515016c0 100644 --- a/src/librustc_codegen_llvm/debuginfo/metadata.rs +++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs @@ -537,7 +537,7 @@ pub fn type_metadata( ty::Slice(typ) => { Ok(vec_slice_metadata(cx, t, typ, unique_type_id, usage_site_span)) } - ty::TyStr => { + ty::Str => { Ok(vec_slice_metadata(cx, t, cx.tcx.types.u8, unique_type_id, usage_site_span)) } ty::Dynamic(..) => { @@ -563,11 +563,11 @@ pub fn type_metadata( let MetadataCreationResult { metadata, already_stored_in_typemap } = match t.sty { ty::Never | - ty::TyBool | - ty::TyChar | - ty::TyInt(_) | - ty::TyUint(_) | - ty::TyFloat(_) => { + ty::Bool | + ty::Char | + ty::Int(_) | + ty::Uint(_) | + ty::Float(_) => { MetadataCreationResult::new(basic_type_metadata(cx, t), false) } ty::Tuple(ref elements) if elements.is_empty() => { @@ -577,7 +577,7 @@ pub fn type_metadata( ty::Slice(typ) => { fixed_vec_metadata(cx, unique_type_id, t, typ, usage_site_span) } - ty::TyStr => { + ty::Str => { fixed_vec_metadata(cx, unique_type_id, t, cx.tcx.types.i8, usage_site_span) } ty::Dynamic(..) => { @@ -768,15 +768,15 @@ fn basic_type_metadata(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll DIType { ty::Never => ("!", DW_ATE_unsigned), ty::Tuple(ref elements) if elements.is_empty() => ("()", DW_ATE_unsigned), - ty::TyBool => ("bool", DW_ATE_boolean), - ty::TyChar => ("char", DW_ATE_unsigned_char), - ty::TyInt(int_ty) => { + ty::Bool => ("bool", DW_ATE_boolean), + ty::Char => ("char", DW_ATE_unsigned_char), + ty::Int(int_ty) => { (int_ty.ty_to_string(), DW_ATE_signed) }, - ty::TyUint(uint_ty) => { + ty::Uint(uint_ty) => { (uint_ty.ty_to_string(), DW_ATE_unsigned) }, - ty::TyFloat(float_ty) => { + ty::Float(float_ty) => { (float_ty.ty_to_string(), DW_ATE_float) }, _ => bug!("debuginfo::basic_type_metadata - t is invalid type") diff --git a/src/librustc_codegen_llvm/debuginfo/type_names.rs b/src/librustc_codegen_llvm/debuginfo/type_names.rs index 0b138d48119..a08b964cd72 100644 --- a/src/librustc_codegen_llvm/debuginfo/type_names.rs +++ b/src/librustc_codegen_llvm/debuginfo/type_names.rs @@ -41,13 +41,13 @@ pub fn push_debuginfo_type_name<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, let cpp_like_names = cx.sess().target.target.options.is_like_msvc; match t.sty { - ty::TyBool => output.push_str("bool"), - ty::TyChar => output.push_str("char"), - ty::TyStr => output.push_str("str"), + ty::Bool => output.push_str("bool"), + ty::Char => output.push_str("char"), + ty::Str => output.push_str("str"), ty::Never => output.push_str("!"), - ty::TyInt(int_ty) => output.push_str(int_ty.ty_to_string()), - ty::TyUint(uint_ty) => output.push_str(uint_ty.ty_to_string()), - ty::TyFloat(float_ty) => output.push_str(float_ty.ty_to_string()), + ty::Int(int_ty) => output.push_str(int_ty.ty_to_string()), + ty::Uint(uint_ty) => output.push_str(uint_ty.ty_to_string()), + ty::Float(float_ty) => output.push_str(float_ty.ty_to_string()), ty::Foreign(def_id) => push_item_name(cx, def_id, qualified, output), ty::Adt(def, substs) => { push_item_name(cx, def.did, qualified, output); -- cgit 1.4.1-3-g733a5