diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-28 03:46:22 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-07 05:25:31 +0100 |
| commit | 55f76cdb2f4d01cf87e47148c706c53a129fa45e (patch) | |
| tree | 2d7d13cc5d9c3ccea097ee12df06556b2d1afde4 /src/librustc_codegen_llvm | |
| parent | bffc3d807394ad5ac8eab7af4c6d227b2870f534 (diff) | |
| download | rust-55f76cdb2f4d01cf87e47148c706c53a129fa45e.tar.gz rust-55f76cdb2f4d01cf87e47148c706c53a129fa45e.zip | |
syntax: use distinct FloatTy from rustc_target.
We also sever syntax's dependency on rustc_target as a result. This should slightly improve pipe-lining. Moreover, some cleanup is done in related code.
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/metadata.rs | 6 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/intrinsic.rs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs index f0148a21ae6..5f18bb1700c 100644 --- a/src/librustc_codegen_llvm/debuginfo/metadata.rs +++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs @@ -843,13 +843,13 @@ fn basic_type_metadata(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll DIType { 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) + (int_ty.name_str(), DW_ATE_signed) }, ty::Uint(uint_ty) => { - (uint_ty.ty_to_string(), DW_ATE_unsigned) + (uint_ty.name_str(), DW_ATE_unsigned) }, ty::Float(float_ty) => { - (float_ty.ty_to_string(), DW_ATE_float) + (float_ty.name_str(), DW_ATE_float) }, _ => bug!("debuginfo::basic_type_metadata - t is invalid type") }; diff --git a/src/librustc_codegen_llvm/intrinsic.rs b/src/librustc_codegen_llvm/intrinsic.rs index 1bce34abe55..a4c3b42f51e 100644 --- a/src/librustc_codegen_llvm/intrinsic.rs +++ b/src/librustc_codegen_llvm/intrinsic.rs @@ -18,8 +18,8 @@ use rustc::ty::layout::{self, LayoutOf, HasTyCtxt, Primitive}; use rustc::mir::interpret::GlobalId; use rustc_codegen_ssa::common::{IntPredicate, TypeKind}; use rustc::hir; -use syntax::ast::{self, FloatTy}; -use rustc_target::abi::HasDataLayout; +use rustc_target::abi::{FloatTy, HasDataLayout}; +use syntax::ast; use rustc_codegen_ssa::common::span_invalid_monomorphization_error; use rustc_codegen_ssa::traits::*; @@ -1335,7 +1335,7 @@ fn generic_simd_intrinsic( }, ty::Float(f) => { return_error!("unsupported element type `{}` of floating-point vector `{}`", - f, in_ty); + f.name_str(), in_ty); }, _ => { return_error!("`{}` is not a floating-point type", in_ty); |
