about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/builder.rs
diff options
context:
space:
mode:
authorDenis Merigoux <denis.merigoux@gmail.com>2018-09-07 13:25:50 -0700
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2018-11-16 14:11:59 +0200
commit0514c7b1b2bbc52cc8f7fe39ef44d0855fddbbdb (patch)
treed041c6c2bc52892f04478597310105ac2e793068 /src/librustc_codegen_llvm/builder.rs
parentc487b825b0a59b3e4c758a79f041245b79f4bf4f (diff)
downloadrust-0514c7b1b2bbc52cc8f7fe39ef44d0855fddbbdb.tar.gz
rust-0514c7b1b2bbc52cc8f7fe39ef44d0855fddbbdb.zip
Generalized some base.rs methods
Diffstat (limited to 'src/librustc_codegen_llvm/builder.rs')
-rw-r--r--src/librustc_codegen_llvm/builder.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/librustc_codegen_llvm/builder.rs b/src/librustc_codegen_llvm/builder.rs
index 2d5468cfc8e..45551669712 100644
--- a/src/librustc_codegen_llvm/builder.rs
+++ b/src/librustc_codegen_llvm/builder.rs
@@ -60,7 +60,6 @@ impl Backend for Builder<'a, 'll, 'tcx>  {
     type Value = &'ll Value;
     type BasicBlock = &'ll BasicBlock;
     type Type = &'ll Type;
-    type TypeKind = llvm::TypeKind;
     type Context = &'ll llvm::Context;
 }
 
@@ -1146,7 +1145,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
         let stored_ty = self.cx.val_ty(val);
         let stored_ptr_ty = self.cx.type_ptr_to(stored_ty);
 
-        assert_eq!(self.cx.type_kind(dest_ptr_ty), llvm::TypeKind::Pointer);
+        assert_eq!(self.cx.type_kind(dest_ptr_ty), TypeKind::Pointer);
 
         if dest_ptr_ty == stored_ptr_ty {
             ptr
@@ -1165,11 +1164,11 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
                       args: &'b [&'ll Value]) -> Cow<'b, [&'ll Value]> {
         let mut fn_ty = self.cx.val_ty(llfn);
         // Strip off pointers
-        while self.cx.type_kind(fn_ty) == llvm::TypeKind::Pointer {
+        while self.cx.type_kind(fn_ty) == TypeKind::Pointer {
             fn_ty = self.cx.element_type(fn_ty);
         }
 
-        assert!(self.cx.type_kind(fn_ty) == llvm::TypeKind::Function,
+        assert!(self.cx.type_kind(fn_ty) == TypeKind::Function,
                 "builder::{} not passed a function, but {:?}", typ, fn_ty);
 
         let param_tys = self.cx.func_params_types(fn_ty);