about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSimonas Kazlauskas <git@kazlauskas.me>2016-08-24 19:29:15 +0300
committerest31 <MTest31@outlook.com>2016-12-30 15:17:26 +0100
commitd9eb756cbfdd0f4388bb7bd203d8d43761ff7942 (patch)
treec0d9821cdc16cf985b41d0a962403e8109b7984b /src
parentec1fdfe1c392c61dffebf0db0f348de566ae0804 (diff)
downloadrust-d9eb756cbfdd0f4388bb7bd203d8d43761ff7942.tar.gz
rust-d9eb756cbfdd0f4388bb7bd203d8d43761ff7942.zip
Wrapping<i128> and attempt at LLVM 3.7 compat
This commit includes manual merge conflict resolution changes from a rebase by @est31.
Diffstat (limited to 'src')
-rw-r--r--src/libcore/num/wrapping.rs2
-rw-r--r--src/librustc_llvm/ffi.rs1
-rw-r--r--src/librustc_trans/type_.rs2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/libcore/num/wrapping.rs b/src/libcore/num/wrapping.rs
index 50d64838a5c..b3c2c25551e 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 efb06bdb73e..acf2bd50847 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 e8d8db2956b..5e4fe015d76 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