diff --git a/src/libcore/num/wrapping.rs b/src/libcore/num/wrapping.rs index 50d64838a5c0..b3c2c25551e0 100644 --- a/src/libcore/num/wrapping.rs +++ b/src/libcore/num/wrapping.rs @@ -298,6 +298,8 @@ macro_rules! wrapping_impl { } wrapping_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 } +#[cfg(not(stage0))] +wrapping_impl! { u128 i128 } mod shift_max { #![allow(non_upper_case_globals)] diff --git a/src/librustc_llvm/ffi.rs b/src/librustc_llvm/ffi.rs index efb06bdb73e3..acf2bd50847c 100644 --- a/src/librustc_llvm/ffi.rs +++ b/src/librustc_llvm/ffi.rs @@ -508,7 +508,6 @@ extern "C" { pub fn LLVMInt16TypeInContext(C: ContextRef) -> TypeRef; pub fn LLVMInt32TypeInContext(C: ContextRef) -> TypeRef; pub fn LLVMInt64TypeInContext(C: ContextRef) -> TypeRef; - pub fn LLVMInt128TypeInContext(C: ContextRef) -> TypeRef; pub fn LLVMIntTypeInContext(C: ContextRef, NumBits: c_uint) -> TypeRef; pub fn LLVMGetIntTypeWidth(IntegerTy: TypeRef) -> c_uint; diff --git a/src/librustc_trans/type_.rs b/src/librustc_trans/type_.rs index e8d8db2956b8..5e4fe015d767 100644 --- a/src/librustc_trans/type_.rs +++ b/src/librustc_trans/type_.rs @@ -95,7 +95,7 @@ impl Type { } pub fn i128(ccx: &CrateContext) -> Type { - ty!(llvm::LLVMInt128TypeInContext(ccx.llcx())) + ty!(llvm::LLVMIntTypeInContext(ccx.llcx(), 128)) } // Creates an integer type with the given number of bits, e.g. i24