]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc_mir/build/misc.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / librustc_mir / build / misc.rs
index 5d040bcb40ad8e72c2a1e111e47923df09e05d99..86f15a6319399cac89d9c90d07db6dd71b5b15af 100644 (file)
@@ -12,8 +12,7 @@
 //! kind of thing.
 
 use build::Builder;
-use hair::*;
-use rustc::middle::ty::Ty;
+use rustc::ty::Ty;
 use rustc::mir::repr::*;
 use std::u32;
 use syntax::codemap::Span;
@@ -47,11 +46,16 @@ impl<'a,'tcx> Builder<'a,'tcx> {
         Operand::Constant(constant)
     }
 
-    pub fn push_usize(&mut self, block: BasicBlock, span: Span, value: usize) -> Lvalue<'tcx> {
+    pub fn push_usize(&mut self,
+                      block: BasicBlock,
+                      scope_id: ScopeId,
+                      span: Span,
+                      value: u64)
+                      -> Lvalue<'tcx> {
         let usize_ty = self.hir.usize_ty();
         let temp = self.temp(usize_ty);
         self.cfg.push_assign_constant(
-            block, span, &temp,
+            block, scope_id, span, &temp,
             Constant {
                 span: span,
                 ty: self.hir.usize_ty(),
@@ -59,16 +63,4 @@ impl<'a,'tcx> Builder<'a,'tcx> {
             });
         temp
     }
-
-    pub fn item_ref_operand(&mut self,
-                            span: Span,
-                            item_ref: ItemRef<'tcx>)
-                            -> Operand<'tcx> {
-        let literal = Literal::Item {
-            def_id: item_ref.def_id,
-            kind: item_ref.kind,
-            substs: item_ref.substs,
-        };
-        self.literal_operand(span, item_ref.ty, literal)
-    }
 }