From 43bfaa4a336095eb5697fb2df50909fd3c72ed14 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 25 Mar 2015 17:06:52 -0700 Subject: Mass rename uint/int to usize/isize Now that support has been removed, all lingering use cases are renamed. --- src/librustc_llvm/archive_ro.rs | 2 +- src/librustc_llvm/lib.rs | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src/librustc_llvm') diff --git a/src/librustc_llvm/archive_ro.rs b/src/librustc_llvm/archive_ro.rs index 0728d5b46e2..cc6a85e86ce 100644 --- a/src/librustc_llvm/archive_ro.rs +++ b/src/librustc_llvm/archive_ro.rs @@ -61,7 +61,7 @@ impl ArchiveRO { if ptr.is_null() { None } else { - Some(slice::from_raw_parts(ptr as *const u8, size as uint)) + Some(slice::from_raw_parts(ptr as *const u8, size as usize)) } } } diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index 9d564fa56f5..60755093516 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -28,7 +28,6 @@ #![feature(box_syntax)] #![feature(collections)] -#![feature(int_uint)] #![feature(libc)] #![feature(link_args)] #![feature(staged_api)] @@ -77,7 +76,7 @@ pub type Bool = c_uint; pub const True: Bool = 1 as Bool; pub const False: Bool = 0 as Bool; -// Consts for the LLVM CallConv type, pre-cast to uint. +// Consts for the LLVM CallConv type, pre-cast to usize. #[derive(Copy, PartialEq)] pub enum CallConv { @@ -242,7 +241,7 @@ impl AttrHelper for SpecialAttribute { } pub struct AttrBuilder { - attrs: Vec<(uint, Box)> + attrs: Vec<(usize, Box)> } impl AttrBuilder { @@ -252,13 +251,13 @@ impl AttrBuilder { } } - pub fn arg<'a, T: AttrHelper + 'static>(&'a mut self, idx: uint, a: T) -> &'a mut AttrBuilder { + pub fn arg<'a, T: AttrHelper + 'static>(&'a mut self, idx: usize, a: T) -> &'a mut AttrBuilder { self.attrs.push((idx, box a as Box)); self } pub fn ret<'a, T: AttrHelper + 'static>(&'a mut self, a: T) -> &'a mut AttrBuilder { - self.attrs.push((ReturnIndex as uint, box a as Box)); + self.attrs.push((ReturnIndex as usize, box a as Box)); self } @@ -693,7 +692,7 @@ extern { -> ValueRef; pub fn LLVMConstFCmp(Pred: c_ushort, V1: ValueRef, V2: ValueRef) -> ValueRef; - /* only for int/vector */ + /* only for isize/vector */ pub fn LLVMGetUndef(Ty: TypeRef) -> ValueRef; pub fn LLVMIsConstant(Val: ValueRef) -> Bool; pub fn LLVMIsNull(Val: ValueRef) -> Bool; @@ -2167,7 +2166,7 @@ impl ObjectFile { pub fn new(llmb: MemoryBufferRef) -> Option { unsafe { let llof = LLVMCreateObjectFile(llmb); - if llof as int == 0 { + if llof as isize == 0 { // LLVMCreateObjectFile took ownership of llmb return None } @@ -2227,7 +2226,7 @@ type RustStringRepr = *mut RefCell>; pub unsafe extern "C" fn rust_llvm_string_write_impl(sr: RustStringRef, ptr: *const c_char, size: size_t) { - let slice = slice::from_raw_parts(ptr as *const u8, size as uint); + let slice = slice::from_raw_parts(ptr as *const u8, size as usize); let sr: RustStringRepr = mem::transmute(sr); (*sr).borrow_mut().push_all(slice); -- cgit 1.4.1-3-g733a5