Skip to content

Commit 567318d

Browse files
committed
---
yaml --- r: 6316 b: refs/heads/master c: 96cdfa1 h: refs/heads/master v: v3
1 parent 0f7322a commit 567318d

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 5cabfb3a395995083468b29d8cc061cd1d9ef6bf
2+
refs/heads/master: 96cdfa11dbc4d3c02fa2ecb2674aaa15ab099674

trunk/src/comp/middle/trans.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,15 +2142,15 @@ fn trans_crate_lit(cx: @crate_ctxt, lit: ast::lit) -> ValueRef {
21422142
ast::ty_i32. { t = T_i32(); }
21432143
ast::ty_i64. { t = T_i64(); }
21442144
}
2145-
ret C_integral(t, i as uint, s);
2145+
ret C_integral(t, i as u64, s);
21462146
}
21472147
ast::lit_float(fs) { ret C_float(cx, fs); }
21482148
ast::lit_mach_float(tm, s) {
21492149
let t = cx.float_type;
21502150
alt tm { ast::ty_f32. { t = T_f32(); } ast::ty_f64. { t = T_f64(); } }
21512151
ret C_floating(s, t);
21522152
}
2153-
ast::lit_char(c) { ret C_integral(T_char(), c as uint, False); }
2153+
ast::lit_char(c) { ret C_integral(T_char(), c as u64, False); }
21542154
ast::lit_bool(b) { ret C_bool(b); }
21552155
ast::lit_nil. { ret C_nil(); }
21562156
ast::lit_str(s) {

trunk/src/comp/middle/trans_common.rs

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -724,14 +724,8 @@ fn T_opaque_chan_ptr() -> TypeRef { ret T_ptr(T_i8()); }
724724
// LLVM constant constructors.
725725
fn C_null(t: TypeRef) -> ValueRef { ret llvm::LLVMConstNull(t); }
726726

727-
fn C_integral(t: TypeRef, u: uint, sign_extend: Bool) -> ValueRef {
728-
// FIXME: We can't use LLVM::ULongLong with our existing minimal native
729-
// API, which only knows word-sized args.
730-
//
731-
// ret llvm::LLVMConstInt(.int_type, t as LLVM::ULongLong, False);
732-
//
733-
734-
ret llvm::LLVMRustConstSmallInt(t, u, sign_extend);
727+
fn C_integral(t: TypeRef, u: u64, sign_extend: Bool) -> ValueRef {
728+
ret llvm::LLVMConstInt(t, u, sign_extend);
735729
}
736730

737731
fn C_float(cx: @crate_ctxt, s: str) -> ValueRef {
@@ -747,28 +741,28 @@ fn C_floating(s: str, t: TypeRef) -> ValueRef {
747741
fn C_nil() -> ValueRef {
748742
// NB: See comment above in T_void().
749743

750-
ret C_integral(T_i1(), 0u, False);
744+
ret C_integral(T_i1(), 0u64, False);
751745
}
752746

753747
fn C_bool(b: bool) -> ValueRef {
754748
if b {
755-
ret C_integral(T_bool(), 1u, False);
756-
} else { ret C_integral(T_bool(), 0u, False); }
749+
ret C_integral(T_bool(), 1u64, False);
750+
} else { ret C_integral(T_bool(), 0u64, False); }
757751
}
758752

759753
fn C_i32(i: i32) -> ValueRef {
760-
ret C_integral(T_i32(), i as uint, True);
754+
ret C_integral(T_i32(), i as u64, True);
761755
}
762756

763757
fn C_int(cx: @crate_ctxt, i: int) -> ValueRef {
764-
ret C_integral(cx.int_type, i as uint, True);
758+
ret C_integral(cx.int_type, i as u64, True);
765759
}
766760

767761
fn C_uint(cx: @crate_ctxt, i: uint) -> ValueRef {
768-
ret C_integral(cx.int_type, i, False);
762+
ret C_integral(cx.int_type, i as u64, False);
769763
}
770764

771-
fn C_u8(i: uint) -> ValueRef { ret C_integral(T_i8(), i, False); }
765+
fn C_u8(i: uint) -> ValueRef { ret C_integral(T_i8(), i as u64, False); }
772766

773767

774768
// This is a 'c-like' raw string, which differs from

0 commit comments

Comments
 (0)