Wrapping<i128> and attempt at LLVM 3.7 compat

This commit includes manual merge conflict resolution changes from a rebase by @est31.
This commit is contained in:
Simonas Kazlauskas 2016-08-24 19:29:15 +03:00 committed by est31
parent ec1fdfe1c3
commit d9eb756cbf
3 changed files with 3 additions and 2 deletions

View File

@ -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)]

View File

@ -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;

View File

@ -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