Skip to content

Commit 67295ff

Browse files
committed
Wrapping<i128> and attempt at LLVM 3.7 compat
1 parent f13c865 commit 67295ff

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/libcore/num/wrapping.rs

Lines changed: 2 additions & 0 deletions
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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,6 @@ extern {
533533
pub fn LLVMInt16TypeInContext(C: ContextRef) -> TypeRef;
534534
pub fn LLVMInt32TypeInContext(C: ContextRef) -> TypeRef;
535535
pub fn LLVMInt64TypeInContext(C: ContextRef) -> TypeRef;
536-
pub fn LLVMInt128TypeInContext(C: ContextRef) -> TypeRef;
537536
pub fn LLVMIntTypeInContext(C: ContextRef, NumBits: c_uint)
538537
-> TypeRef;
539538

src/librustc_trans/type_.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl Type {
9797
}
9898

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

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

0 commit comments

Comments
 (0)