Skip to content

Commit

Permalink
Wrapping<i128> and attempt at LLVM 3.7 compat
Browse files Browse the repository at this point in the history
This commit includes manual merge conflict resolution changes from a rebase by @est31.
  • Loading branch information
nagisa authored and est31 committed Dec 30, 2016
1 parent ec1fdfe commit d9eb756
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/libcore/num/wrapping.rs
Expand Up @@ -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)]
Expand Down
1 change: 0 additions & 1 deletion src/librustc_llvm/ffi.rs
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_trans/type_.rs
Expand Up @@ -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
Expand Down

0 comments on commit d9eb756

Please sign in to comment.