about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-08-22 01:35:55 +0100
committervarkor <github@varkor.com>2018-08-22 16:08:49 +0100
commit8a5dccde2adca594db2ecd684484410139842c29 (patch)
treee20a0973374adff0a06f2f54d171dc21ff0dcb3b /src/librustc_codegen_llvm
parent04fa5d3adbb8212f5b4e87e3bbd7b74bb7c9ec65 (diff)
downloadrust-8a5dccde2adca594db2ecd684484410139842c29.tar.gz
rust-8a5dccde2adca594db2ecd684484410139842c29.zip
Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str}
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/base.rs6
-rw-r--r--src/librustc_codegen_llvm/context.rs2
-rw-r--r--src/librustc_codegen_llvm/debuginfo/metadata.rs24
-rw-r--r--src/librustc_codegen_llvm/debuginfo/type_names.rs12
-rw-r--r--src/librustc_codegen_llvm/glue.rs2
-rw-r--r--src/librustc_codegen_llvm/intrinsic.rs80
-rw-r--r--src/librustc_codegen_llvm/mir/place.rs2
-rw-r--r--src/librustc_codegen_llvm/mir/rvalue.rs74
-rw-r--r--src/librustc_codegen_llvm/type_of.rs2
9 files changed, 102 insertions, 102 deletions
diff --git a/src/librustc_codegen_llvm/base.rs b/src/librustc_codegen_llvm/base.rs
index 33dc94b27bd..009c6da9d8d 100644
--- a/src/librustc_codegen_llvm/base.rs
+++ b/src/librustc_codegen_llvm/base.rs
@@ -166,12 +166,12 @@ pub fn compare_simd_types(
     op: hir::BinOpKind
 ) -> &'ll Value {
     let signed = match t.sty {
-        ty::TyFloat(_) => {
+        ty::Float(_) => {
             let cmp = bin_op_to_fcmp_predicate(op);
             return bx.sext(bx.fcmp(cmp, lhs, rhs), ret_ty);
         },
-        ty::TyUint(_) => false,
-        ty::TyInt(_) => true,
+        ty::Uint(_) => false,
+        ty::Int(_) => true,
         _ => bug!("compare_simd_types: invalid SIMD type"),
     };
 
diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs
index 2ee4bec5ac2..9547f4a190e 100644
--- a/src/librustc_codegen_llvm/context.rs
+++ b/src/librustc_codegen_llvm/context.rs
@@ -435,7 +435,7 @@ impl<'b, 'tcx> CodegenCx<'b, 'tcx> {
         let tail = self.tcx.struct_tail(ty);
         match tail.sty {
             ty::Foreign(..) => false,
-            ty::TyStr | ty::Slice(..) | ty::Dynamic(..) => true,
+            ty::Str | ty::Slice(..) | ty::Dynamic(..) => true,
             _ => bug!("unexpected unsized tail: {:?}", tail.sty),
         }
     }
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);
diff --git a/src/librustc_codegen_llvm/glue.rs b/src/librustc_codegen_llvm/glue.rs
index 791d003165f..ff33cec0437 100644
--- a/src/librustc_codegen_llvm/glue.rs
+++ b/src/librustc_codegen_llvm/glue.rs
@@ -40,7 +40,7 @@ pub fn size_and_align_of_dst(bx: &Builder<'_, 'll, 'tcx>, t: Ty<'tcx>, info: Opt
             let vtable = info.unwrap();
             (meth::SIZE.get_usize(bx, vtable), meth::ALIGN.get_usize(bx, vtable))
         }
-        ty::Slice(_) | ty::TyStr => {
+        ty::Slice(_) | ty::Str => {
             let unit = t.sequence_element_type(bx.tcx());
             // The info in this case is the length of the str, so the size is that
             // times the unit size.
diff --git a/src/librustc_codegen_llvm/intrinsic.rs b/src/librustc_codegen_llvm/intrinsic.rs
index 06abe31327a..5d00e080799 100644
--- a/src/librustc_codegen_llvm/intrinsic.rs
+++ b/src/librustc_codegen_llvm/intrinsic.rs
@@ -1149,7 +1149,7 @@ fn generic_simd_intrinsic(
                  m_len, v_len
         );
         match m_elem_ty.sty {
-            ty::TyInt(_) => {},
+            ty::Int(_) => {},
             _ => {
                 return_error!("mask element type is `{}`, expected `i_`", m_elem_ty);
             }
@@ -1191,7 +1191,7 @@ fn generic_simd_intrinsic(
             }
         }
         let ety = match in_elem.sty {
-            ty::TyFloat(f) if f.bit_width() == 32 => {
+            ty::Float(f) if f.bit_width() == 32 => {
                 if in_len < 2 || in_len > 16 {
                     return_error!(
                         "unsupported floating-point vector `{}` with length `{}` \
@@ -1200,7 +1200,7 @@ fn generic_simd_intrinsic(
                 }
                 "f32"
             },
-            ty::TyFloat(f) if f.bit_width() == 64 => {
+            ty::Float(f) if f.bit_width() == 64 => {
                 if in_len < 2 || in_len > 8 {
                     return_error!("unsupported floating-point vector `{}` with length `{}` \
                                    out-of-range [2, 8]",
@@ -1208,7 +1208,7 @@ fn generic_simd_intrinsic(
                 }
                 "f64"
             },
-            ty::TyFloat(f) => {
+            ty::Float(f) => {
                 return_error!("unsupported element type `{}` of floating-point vector `{}`",
                               f, in_ty);
             },
@@ -1288,9 +1288,9 @@ fn generic_simd_intrinsic(
     fn llvm_vector_str(elem_ty: ty::Ty, vec_len: usize, no_pointers: usize) -> String {
         let p0s: String = "p0".repeat(no_pointers);
         match elem_ty.sty {
-            ty::TyInt(v) => format!("v{}{}i{}", vec_len, p0s, v.bit_width().unwrap()),
-            ty::TyUint(v) => format!("v{}{}i{}", vec_len, p0s, v.bit_width().unwrap()),
-            ty::TyFloat(v) => format!("v{}{}f{}", vec_len, p0s, v.bit_width()),
+            ty::Int(v) => format!("v{}{}i{}", vec_len, p0s, v.bit_width().unwrap()),
+            ty::Uint(v) => format!("v{}{}i{}", vec_len, p0s, v.bit_width().unwrap()),
+            ty::Float(v) => format!("v{}{}f{}", vec_len, p0s, v.bit_width()),
             _ => unreachable!(),
         }
     }
@@ -1299,9 +1299,9 @@ fn generic_simd_intrinsic(
                       mut no_pointers: usize) -> &'ll Type {
         // FIXME: use cx.layout_of(ty).llvm_type() ?
         let mut elem_ty = match elem_ty.sty {
-            ty::TyInt(v) => Type::int_from_ty(cx, v),
-            ty::TyUint(v) => Type::uint_from_ty(cx, v),
-            ty::TyFloat(v) => Type::float_from_ty(cx, v),
+            ty::Int(v) => Type::int_from_ty(cx, v),
+            ty::Uint(v) => Type::uint_from_ty(cx, v),
+            ty::Float(v) => Type::float_from_ty(cx, v),
             _ => unreachable!(),
         };
         while no_pointers > 0 {
@@ -1376,7 +1376,7 @@ fn generic_simd_intrinsic(
 
         // The element type of the third argument must be a signed integer type of any width:
         match arg_tys[2].simd_type(tcx).sty {
-            ty::TyInt(_) => (),
+            ty::Int(_) => (),
             _ => {
                 require!(false, "expected element type `{}` of third argument `{}` \
                                  to be a signed integer type",
@@ -1473,7 +1473,7 @@ fn generic_simd_intrinsic(
 
         // The element type of the third argument must be a signed integer type of any width:
         match arg_tys[2].simd_type(tcx).sty {
-            ty::TyInt(_) => (),
+            ty::Int(_) => (),
             _ => {
                 require!(false, "expected element type `{}` of third argument `{}` \
                                  to be a signed integer type",
@@ -1522,7 +1522,7 @@ fn generic_simd_intrinsic(
                          "expected return type `{}` (element of input `{}`), found `{}`",
                          in_elem, in_ty, ret_ty);
                 return match in_elem.sty {
-                    ty::TyInt(_) | ty::TyUint(_) => {
+                    ty::Int(_) | ty::Uint(_) => {
                         let r = bx.$integer_reduce(args[0].immediate());
                         if $ordered {
                             // if overflow occurs, the result is the
@@ -1536,7 +1536,7 @@ fn generic_simd_intrinsic(
                             Ok(bx.$integer_reduce(args[0].immediate()))
                         }
                     },
-                    ty::TyFloat(f) => {
+                    ty::Float(f) => {
                         // ordered arithmetic reductions take an accumulator
                         let acc = if $ordered {
                             let acc = args[1].immediate();
@@ -1597,13 +1597,13 @@ unsupported {} from `{}` with element `{}` of size `{}` to `{}`"#,
                          "expected return type `{}` (element of input `{}`), found `{}`",
                          in_elem, in_ty, ret_ty);
                 return match in_elem.sty {
-                    ty::TyInt(_i) => {
+                    ty::Int(_i) => {
                         Ok(bx.$int_red(args[0].immediate(), true))
                     },
-                    ty::TyUint(_u) => {
+                    ty::Uint(_u) => {
                         Ok(bx.$int_red(args[0].immediate(), false))
                     },
-                    ty::TyFloat(_f) => {
+                    ty::Float(_f) => {
                         Ok(bx.$float_red(args[0].immediate()))
                     }
                     _ => {
@@ -1632,7 +1632,7 @@ unsupported {} from `{}` with element `{}` of size `{}` to `{}`"#,
                     args[0].immediate()
                 } else {
                     match in_elem.sty {
-                        ty::TyInt(_) | ty::TyUint(_) => {},
+                        ty::Int(_) | ty::Uint(_) => {},
                         _ => {
                             return_error!("unsupported {} from `{}` with element `{}` to `{}`",
                                           $name, in_ty, in_elem, ret_ty)
@@ -1645,7 +1645,7 @@ unsupported {} from `{}` with element `{}` of size `{}` to `{}`"#,
                     bx.trunc(args[0].immediate(), i1xn)
                 };
                 return match in_elem.sty {
-                    ty::TyInt(_) | ty::TyUint(_) => {
+                    ty::Int(_) | ty::Uint(_) => {
                         let r = bx.$red(input);
                         Ok(
                             if !$boolean {
@@ -1688,15 +1688,15 @@ unsupported {} from `{}` with element `{}` of size `{}` to `{}`"#,
         let (in_style, in_width) = match in_elem.sty {
             // vectors of pointer-sized integers should've been
             // disallowed before here, so this unwrap is safe.
-            ty::TyInt(i) => (Style::Int(true), i.bit_width().unwrap()),
-            ty::TyUint(u) => (Style::Int(false), u.bit_width().unwrap()),
-            ty::TyFloat(f) => (Style::Float, f.bit_width()),
+            ty::Int(i) => (Style::Int(true), i.bit_width().unwrap()),
+            ty::Uint(u) => (Style::Int(false), u.bit_width().unwrap()),
+            ty::Float(f) => (Style::Float, f.bit_width()),
             _ => (Style::Unsupported, 0)
         };
         let (out_style, out_width) = match out_elem.sty {
-            ty::TyInt(i) => (Style::Int(true), i.bit_width().unwrap()),
-            ty::TyUint(u) => (Style::Int(false), u.bit_width().unwrap()),
-            ty::TyFloat(f) => (Style::Float, f.bit_width()),
+            ty::Int(i) => (Style::Int(true), i.bit_width().unwrap()),
+            ty::Uint(u) => (Style::Int(false), u.bit_width().unwrap()),
+            ty::Float(f) => (Style::Float, f.bit_width()),
             _ => (Style::Unsupported, 0)
         };
 
@@ -1757,18 +1757,18 @@ unsupported {} from `{}` with element `{}` of size `{}` to `{}`"#,
         }
     }
     arith! {
-        simd_add: TyUint, TyInt => add, TyFloat => fadd;
-        simd_sub: TyUint, TyInt => sub, TyFloat => fsub;
-        simd_mul: TyUint, TyInt => mul, TyFloat => fmul;
-        simd_div: TyUint => udiv, TyInt => sdiv, TyFloat => fdiv;
-        simd_rem: TyUint => urem, TyInt => srem, TyFloat => frem;
-        simd_shl: TyUint, TyInt => shl;
-        simd_shr: TyUint => lshr, TyInt => ashr;
-        simd_and: TyUint, TyInt => and;
-        simd_or: TyUint, TyInt => or;
-        simd_xor: TyUint, TyInt => xor;
-        simd_fmax: TyFloat => maxnum;
-        simd_fmin: TyFloat => minnum;
+        simd_add: Uint, Int => add, Float => fadd;
+        simd_sub: Uint, Int => sub, Float => fsub;
+        simd_mul: Uint, Int => mul, Float => fmul;
+        simd_div: Uint => udiv, Int => sdiv, Float => fdiv;
+        simd_rem: Uint => urem, Int => srem, Float => frem;
+        simd_shl: Uint, Int => shl;
+        simd_shr: Uint => lshr, Int => ashr;
+        simd_and: Uint, Int => and;
+        simd_or: Uint, Int => or;
+        simd_xor: Uint, Int => xor;
+        simd_fmax: Float => maxnum;
+        simd_fmin: Float => minnum;
     }
     span_bug!(span, "unknown SIMD intrinsic");
 }
@@ -1779,7 +1779,7 @@ unsupported {} from `{}` with element `{}` of size `{}` to `{}`"#,
 // stuffs.
 fn int_type_width_signed(ty: Ty, cx: &CodegenCx) -> Option<(u64, bool)> {
     match ty.sty {
-        ty::TyInt(t) => Some((match t {
+        ty::Int(t) => Some((match t {
             ast::IntTy::Isize => cx.tcx.sess.target.isize_ty.bit_width().unwrap() as u64,
             ast::IntTy::I8 => 8,
             ast::IntTy::I16 => 16,
@@ -1787,7 +1787,7 @@ fn int_type_width_signed(ty: Ty, cx: &CodegenCx) -> Option<(u64, bool)> {
             ast::IntTy::I64 => 64,
             ast::IntTy::I128 => 128,
         }, true)),
-        ty::TyUint(t) => Some((match t {
+        ty::Uint(t) => Some((match t {
             ast::UintTy::Usize => cx.tcx.sess.target.usize_ty.bit_width().unwrap() as u64,
             ast::UintTy::U8 => 8,
             ast::UintTy::U16 => 16,
@@ -1803,7 +1803,7 @@ fn int_type_width_signed(ty: Ty, cx: &CodegenCx) -> Option<(u64, bool)> {
 // Returns None if the type is not a float
 fn float_type_width<'tcx>(sty: &ty::TyKind<'tcx>) -> Option<u64> {
     match *sty {
-        ty::TyFloat(t) => Some(t.bit_width() as u64),
+        ty::Float(t) => Some(t.bit_width() as u64),
         _ => None,
     }
 }
diff --git a/src/librustc_codegen_llvm/mir/place.rs b/src/librustc_codegen_llvm/mir/place.rs
index f280589b7a0..ce3292eaa42 100644
--- a/src/librustc_codegen_llvm/mir/place.rs
+++ b/src/librustc_codegen_llvm/mir/place.rs
@@ -211,7 +211,7 @@ impl PlaceRef<'ll, 'tcx> {
                 return simple();
             }
             _ if !field.is_unsized() => return simple(),
-            ty::Slice(..) | ty::TyStr | ty::Foreign(..) => return simple(),
+            ty::Slice(..) | ty::Str | ty::Foreign(..) => return simple(),
             ty::Adt(def, _) => {
                 if def.repr.packed() {
                     // FIXME(eddyb) generalize the adjustment when we
diff --git a/src/librustc_codegen_llvm/mir/rvalue.rs b/src/librustc_codegen_llvm/mir/rvalue.rs
index 69263cbf416..25f32360815 100644
--- a/src/librustc_codegen_llvm/mir/rvalue.rs
+++ b/src/librustc_codegen_llvm/mir/rvalue.rs
@@ -753,60 +753,60 @@ enum OverflowOp {
 fn get_overflow_intrinsic(oop: OverflowOp, bx: &Builder<'_, 'll, '_>, ty: Ty) -> &'ll Value {
     use syntax::ast::IntTy::*;
     use syntax::ast::UintTy::*;
-    use rustc::ty::{TyInt, TyUint};
+    use rustc::ty::{Int, Uint};
 
     let tcx = bx.tcx();
 
     let new_sty = match ty.sty {
-        TyInt(Isize) => TyInt(tcx.sess.target.isize_ty),
-        TyUint(Usize) => TyUint(tcx.sess.target.usize_ty),
-        ref t @ TyUint(_) | ref t @ TyInt(_) => t.clone(),
+        Int(Isize) => Int(tcx.sess.target.isize_ty),
+        Uint(Usize) => Uint(tcx.sess.target.usize_ty),
+        ref t @ Uint(_) | ref t @ Int(_) => t.clone(),
         _ => panic!("tried to get overflow intrinsic for op applied to non-int type")
     };
 
     let name = match oop {
         OverflowOp::Add => match new_sty {
-            TyInt(I8) => "llvm.sadd.with.overflow.i8",
-            TyInt(I16) => "llvm.sadd.with.overflow.i16",
-            TyInt(I32) => "llvm.sadd.with.overflow.i32",
-            TyInt(I64) => "llvm.sadd.with.overflow.i64",
-            TyInt(I128) => "llvm.sadd.with.overflow.i128",
-
-            TyUint(U8) => "llvm.uadd.with.overflow.i8",
-            TyUint(U16) => "llvm.uadd.with.overflow.i16",
-            TyUint(U32) => "llvm.uadd.with.overflow.i32",
-            TyUint(U64) => "llvm.uadd.with.overflow.i64",
-            TyUint(U128) => "llvm.uadd.with.overflow.i128",
+            Int(I8) => "llvm.sadd.with.overflow.i8",
+            Int(I16) => "llvm.sadd.with.overflow.i16",
+            Int(I32) => "llvm.sadd.with.overflow.i32",
+            Int(I64) => "llvm.sadd.with.overflow.i64",
+            Int(I128) => "llvm.sadd.with.overflow.i128",
+
+            Uint(U8) => "llvm.uadd.with.overflow.i8",
+            Uint(U16) => "llvm.uadd.with.overflow.i16",
+            Uint(U32) => "llvm.uadd.with.overflow.i32",
+            Uint(U64) => "llvm.uadd.with.overflow.i64",
+            Uint(U128) => "llvm.uadd.with.overflow.i128",
 
             _ => unreachable!(),
         },
         OverflowOp::Sub => match new_sty {
-            TyInt(I8) => "llvm.ssub.with.overflow.i8",
-            TyInt(I16) => "llvm.ssub.with.overflow.i16",
-            TyInt(I32) => "llvm.ssub.with.overflow.i32",
-            TyInt(I64) => "llvm.ssub.with.overflow.i64",
-            TyInt(I128) => "llvm.ssub.with.overflow.i128",
-
-            TyUint(U8) => "llvm.usub.with.overflow.i8",
-            TyUint(U16) => "llvm.usub.with.overflow.i16",
-            TyUint(U32) => "llvm.usub.with.overflow.i32",
-            TyUint(U64) => "llvm.usub.with.overflow.i64",
-            TyUint(U128) => "llvm.usub.with.overflow.i128",
+            Int(I8) => "llvm.ssub.with.overflow.i8",
+            Int(I16) => "llvm.ssub.with.overflow.i16",
+            Int(I32) => "llvm.ssub.with.overflow.i32",
+            Int(I64) => "llvm.ssub.with.overflow.i64",
+            Int(I128) => "llvm.ssub.with.overflow.i128",
+
+            Uint(U8) => "llvm.usub.with.overflow.i8",
+            Uint(U16) => "llvm.usub.with.overflow.i16",
+            Uint(U32) => "llvm.usub.with.overflow.i32",
+            Uint(U64) => "llvm.usub.with.overflow.i64",
+            Uint(U128) => "llvm.usub.with.overflow.i128",
 
             _ => unreachable!(),
         },
         OverflowOp::Mul => match new_sty {
-            TyInt(I8) => "llvm.smul.with.overflow.i8",
-            TyInt(I16) => "llvm.smul.with.overflow.i16",
-            TyInt(I32) => "llvm.smul.with.overflow.i32",
-            TyInt(I64) => "llvm.smul.with.overflow.i64",
-            TyInt(I128) => "llvm.smul.with.overflow.i128",
-
-            TyUint(U8) => "llvm.umul.with.overflow.i8",
-            TyUint(U16) => "llvm.umul.with.overflow.i16",
-            TyUint(U32) => "llvm.umul.with.overflow.i32",
-            TyUint(U64) => "llvm.umul.with.overflow.i64",
-            TyUint(U128) => "llvm.umul.with.overflow.i128",
+            Int(I8) => "llvm.smul.with.overflow.i8",
+            Int(I16) => "llvm.smul.with.overflow.i16",
+            Int(I32) => "llvm.smul.with.overflow.i32",
+            Int(I64) => "llvm.smul.with.overflow.i64",
+            Int(I128) => "llvm.smul.with.overflow.i128",
+
+            Uint(U8) => "llvm.umul.with.overflow.i8",
+            Uint(U16) => "llvm.umul.with.overflow.i16",
+            Uint(U32) => "llvm.umul.with.overflow.i32",
+            Uint(U64) => "llvm.umul.with.overflow.i64",
+            Uint(U128) => "llvm.umul.with.overflow.i128",
 
             _ => unreachable!(),
         },
diff --git a/src/librustc_codegen_llvm/type_of.rs b/src/librustc_codegen_llvm/type_of.rs
index 0864b127fae..e6907030ae6 100644
--- a/src/librustc_codegen_llvm/type_of.rs
+++ b/src/librustc_codegen_llvm/type_of.rs
@@ -63,7 +63,7 @@ fn uncached_llvm_type<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>,
         // in problematically distinct types due to HRTB and subtyping (see #47638).
         // ty::Dynamic(..) |
         ty::Foreign(..) |
-        ty::TyStr => {
+        ty::Str => {
             let mut name = String::with_capacity(32);
             let printer = DefPathBasedNames::new(cx.tcx, true, true);
             printer.push_type_name(layout.ty, &mut name);