Skip to content

Commit bcfb368

Browse files
committed
Wrapping<i128> and attempt at LLVM 3.7 compat
1 parent 31c7242 commit bcfb368

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/libcore/num/wrapping.rs

+2
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ macro_rules! wrapping_impl {
288288
}
289289

290290
wrapping_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
291+
#[cfg(not(stage0))]
292+
wrapping_impl! { u128 i128 }
291293

292294
mod shift_max {
293295
#![allow(non_upper_case_globals)]

src/librustc_llvm/ffi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,6 @@ extern {
538538
pub fn LLVMInt16TypeInContext(C: ContextRef) -> TypeRef;
539539
pub fn LLVMInt32TypeInContext(C: ContextRef) -> TypeRef;
540540
pub fn LLVMInt64TypeInContext(C: ContextRef) -> TypeRef;
541-
pub fn LLVMInt128TypeInContext(C: ContextRef) -> TypeRef;
542541
pub fn LLVMIntTypeInContext(C: ContextRef, NumBits: c_uint)
543542
-> TypeRef;
544543

src/librustc_trans/type_.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl Type {
9696
}
9797

9898
pub fn i128(ccx: &CrateContext) -> Type {
99-
ty!(llvm::LLVMInt128TypeInContext(ccx.llcx()))
99+
ty!(llvm::LLVMIntTypeInContext(ccx.llcx(), 128))
100100
}
101101

102102
// Creates an integer type with the given number of bits, e.g. i24

0 commit comments

Comments
 (0)