Skip to content

Commit 1dcb8e6

Browse files
committed
---
yaml --- r: 62512 b: refs/heads/snap-stage3 c: 808c5b8 h: refs/heads/master v: v3
1 parent b9afd50 commit 1dcb8e6

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: b97642758fb2c060ec689c540576d308fc081f1e
4+
refs/heads/snap-stage3: 808c5b8d4e479b5e0fd336f8290fda2f0c429257
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/lib/llvm.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use core::hashmap::HashMap;
12-
use core::libc::c_uint;
12+
use core::libc::{c_uint, c_ushort};
1313

1414
pub type Opcode = u32;
1515
pub type Bool = c_uint;
@@ -221,7 +221,7 @@ pub mod llvm {
221221
use super::{SectionIteratorRef, TargetDataRef, TypeKind, TypeRef, UseRef};
222222
use super::{ValueRef};
223223

224-
use core::libc::{c_char, c_int, c_longlong, c_uint, c_ulonglong};
224+
use core::libc::{c_char, c_int, c_longlong, c_ushort, c_uint, c_ulonglong};
225225

226226
#[link_args = "-Lrustllvm -lrustllvm"]
227227
#[link_name = "rustllvm"]
@@ -452,9 +452,9 @@ pub mod llvm {
452452
#[fast_ffi]
453453
pub unsafe fn LLVMConstAllOnes(Ty: TypeRef) -> ValueRef;
454454
#[fast_ffi]
455-
pub unsafe fn LLVMConstICmp(Pred: c_uint, V1: ValueRef, V2: ValueRef) -> ValueRef;
455+
pub unsafe fn LLVMConstICmp(Pred: c_ushort, V1: ValueRef, V2: ValueRef) -> ValueRef;
456456
#[fast_ffi]
457-
pub unsafe fn LLVMConstFCmp(Pred: c_uint, V1: ValueRef, V2: ValueRef) -> ValueRef;
457+
pub unsafe fn LLVMConstFCmp(Pred: c_ushort, V1: ValueRef, V2: ValueRef) -> ValueRef;
458458
/* only for int/vector */
459459
#[fast_ffi]
460460
pub unsafe fn LLVMGetUndef(Ty: TypeRef) -> ValueRef;
@@ -1920,12 +1920,12 @@ pub fn SetLinkage(Global: ValueRef, Link: Linkage) {
19201920

19211921
pub fn ConstICmp(Pred: IntPredicate, V1: ValueRef, V2: ValueRef) -> ValueRef {
19221922
unsafe {
1923-
llvm::LLVMConstICmp(Pred as c_uint, V1, V2)
1923+
llvm::LLVMConstICmp(Pred as c_ushort, V1, V2)
19241924
}
19251925
}
19261926
pub fn ConstFCmp(Pred: RealPredicate, V1: ValueRef, V2: ValueRef) -> ValueRef {
19271927
unsafe {
1928-
llvm::LLVMConstICmp(Pred as c_uint, V1, V2)
1928+
llvm::LLVMConstFCmp(Pred as c_ushort, V1, V2)
19291929
}
19301930
}
19311931
/* Memory-managed object interface to type handles. */

branches/snap-stage3/src/test/run-pass/const-binops.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,23 @@ static z: bool = 1.0 == 1.0;
3838

3939
static aa: bool = 1 <= 2;
4040
static ab: bool = -1 <= 2;
41-
static ac: bool = 1.0 <= 2;
41+
static ac: bool = 1.0 <= 2.0;
4242

4343
static ad: bool = 1 < 2;
4444
static ae: bool = -1 < 2;
45-
static af: bool = 1.0 < 2;
45+
static af: bool = 1.0 < 2.0;
4646

4747
static ag: bool = 1 != 2;
4848
static ah: bool = -1 != 2;
49-
static ai: bool = 1.0 != 2;
49+
static ai: bool = 1.0 != 2.0;
5050

5151
static aj: bool = 2 >= 1;
5252
static ak: bool = 2 >= -2;
53-
static al: bool = 1.0 >= -2;
53+
static al: bool = 1.0 >= -2.0;
5454

5555
static am: bool = 2 > 1;
5656
static an: bool = 2 > -2;
57-
static ao: bool = 1.0 > -2;
57+
static ao: bool = 1.0 > -2.0;
5858

5959
fn main() {
6060
assert_eq!(a, -1);
@@ -63,7 +63,7 @@ fn main() {
6363

6464
assert_eq!(c, -1);
6565
assert_eq!(d, 0);
66-
assert_approx_eq!(e, -0.3);
66+
assert_approx_eq!(e, 0.3);
6767

6868
assert_eq!(e2, -9);
6969
assert_eq!(f, 9);

0 commit comments

Comments
 (0)