@@ -1073,7 +1073,7 @@ fn set_no_inline(f: ValueRef) {
10731073 llvm:: LLVMAddFunctionAttr ( f,
10741074 lib:: llvm:: LLVMNoInlineAttribute as
10751075 lib:: llvm:: llvm:: Attribute ,
1076- 0u32 ) ;
1076+ 0 u as c_uint ) ;
10771077}
10781078
10791079// Tell LLVM to emit the information necessary to unwind the stack for the
@@ -1082,19 +1082,20 @@ fn set_uwtable(f: ValueRef) {
10821082 llvm:: LLVMAddFunctionAttr ( f,
10831083 lib:: llvm:: LLVMUWTableAttribute as
10841084 lib:: llvm:: llvm:: Attribute ,
1085- 0u32 ) ;
1085+ 0 u as c_uint ) ;
10861086}
10871087
10881088fn set_always_inline ( f : ValueRef ) {
10891089 llvm:: LLVMAddFunctionAttr ( f,
10901090 lib:: llvm:: LLVMAlwaysInlineAttribute as
10911091 lib:: llvm:: llvm:: Attribute ,
1092- 0u32 ) ;
1092+ 0 u as c_uint ) ;
10931093}
10941094
10951095fn set_custom_stack_growth_fn ( f : ValueRef ) {
10961096 // TODO: Remove this hack to work around the lack of u64 in the FFI.
1097- llvm:: LLVMAddFunctionAttr ( f, 0 as lib:: llvm:: llvm:: Attribute , 1u32 ) ;
1097+ llvm:: LLVMAddFunctionAttr ( f, 0 as lib:: llvm:: llvm:: Attribute ,
1098+ 1 u as c_uint ) ;
10981099}
10991100
11001101fn set_glue_inlining ( cx : @local_ctxt , f : ValueRef , t : ty:: t ) {
@@ -1181,7 +1182,7 @@ fn make_generic_glue_inner(cx: @local_ctxt, sp: span, t: ty::t,
11811182 } else { T_ptr ( T_i8 ( ) ) } ;
11821183
11831184 let ty_param_count = vec:: len :: < uint > ( ty_params) ;
1184- let lltyparams = llvm:: LLVMGetParam ( llfn, 2u32 ) ;
1185+ let lltyparams = llvm:: LLVMGetParam ( llfn, 2 u as c_uint ) ;
11851186 let load_env_bcx = new_raw_block_ctxt ( fcx, fcx. llloadenv ) ;
11861187 let lltydescs = [ mutable] ;
11871188 let p = 0 u;
@@ -1196,7 +1197,7 @@ fn make_generic_glue_inner(cx: @local_ctxt, sp: span, t: ty::t,
11961197
11971198 let bcx = new_top_block_ctxt ( fcx) ;
11981199 let lltop = bcx. llbb ;
1199- let llrawptr0 = llvm:: LLVMGetParam ( llfn, 3u32 ) ;
1200+ let llrawptr0 = llvm:: LLVMGetParam ( llfn, 3 u as c_uint ) ;
12001201 let llval0 = BitCast ( bcx, llrawptr0, llty) ;
12011202 helper ( bcx, llval0, t) ;
12021203 finish_fn ( fcx, lltop) ;
@@ -4303,8 +4304,8 @@ fn new_fn_ctxt_w_id(cx: @local_ctxt, sp: span, llfndecl: ValueRef,
43034304 -> @fn_ctxt {
43044305 let llbbs = mk_standard_basic_blocks ( llfndecl) ;
43054306 ret @{ llfn : llfndecl,
4306- llenv : llvm:: LLVMGetParam ( llfndecl, 1u32 ) ,
4307- llretptr : llvm:: LLVMGetParam ( llfndecl, 0u32 ) ,
4307+ llenv : llvm:: LLVMGetParam ( llfndecl, 1 u as c_uint ) ,
4308+ llretptr : llvm:: LLVMGetParam ( llfndecl, 0 u as c_uint ) ,
43084309 mutable llstaticallocas : llbbs. sa ,
43094310 mutable llloadenv : llbbs. ca ,
43104311 mutable llderivedtydescs_first : llbbs. dt ,
@@ -4347,21 +4348,22 @@ fn create_llargs_for_fn_args(cx: @fn_ctxt, ty_self: self_arg,
43474348 // Skip the implicit arguments 0, and 1. TODO: Pull out 2u and define
43484349 // it as a constant, since we're using it in several places in trans this
43494350 // way.
4350- let arg_n = 2u32 ;
4351+ let arg_n = 2 u ;
43514352 alt ty_self {
43524353 impl_self( tt) {
43534354 cx. llself = some ( { v: cx. llenv , t: tt} ) ;
43544355 }
43554356 no_self. { }
43564357 }
43574358 for tp in ty_params {
4358- let lltydesc = llvm:: LLVMGetParam ( cx. llfn , arg_n) , dicts = none;
4359- arg_n += 1u32 ;
4359+ let lltydesc = llvm:: LLVMGetParam ( cx. llfn , arg_n as c_uint ) ;
4360+ let dicts = none;
4361+ arg_n += 1 u;
43604362 for bound in * fcx_tcx ( cx) . ty_param_bounds . get ( tp. id ) {
43614363 alt bound {
43624364 ty : : bound_iface ( _) {
4363- let dict = llvm:: LLVMGetParam ( cx. llfn , arg_n) ;
4364- arg_n += 1u32 ;
4365+ let dict = llvm:: LLVMGetParam ( cx. llfn , arg_n as c_uint ) ;
4366+ arg_n += 1 u ;
43654367 dicts = some ( alt dicts {
43664368 none. { [ dict] }
43674369 some ( ds) { ds + [ dict] }
@@ -4376,13 +4378,13 @@ fn create_llargs_for_fn_args(cx: @fn_ctxt, ty_self: self_arg,
43764378 // Populate the llargs field of the function context with the ValueRefs
43774379 // that we get from llvm::LLVMGetParam for each argument.
43784380 for arg: ast:: arg in args {
4379- let llarg = llvm:: LLVMGetParam ( cx. llfn , arg_n) ;
4381+ let llarg = llvm:: LLVMGetParam ( cx. llfn , arg_n as c_uint ) ;
43804382 assert ( llarg as int != 0 ) ;
43814383 // Note that this uses local_mem even for things passed by value.
43824384 // copy_args_to_allocas will overwrite the table entry with local_imm
43834385 // before it's actually used.
43844386 cx. llargs . insert ( arg. id , local_mem ( llarg) ) ;
4385- arg_n += 1u32 ;
4387+ arg_n += 1 u ;
43864388 }
43874389}
43884390
@@ -4801,7 +4803,7 @@ fn trans_native_mod(lcx: @local_ctxt, native_mod: ast::native_mod,
48014803 let fcx = new_fn_ctxt ( lcx, span, llshimfn) ;
48024804 let bcx = new_top_block_ctxt ( fcx) ;
48034805 let lltop = bcx. llbb ;
4804- let llargbundle = llvm:: LLVMGetParam ( llshimfn, 0u32 ) ;
4806+ let llargbundle = llvm:: LLVMGetParam ( llshimfn, 0 as c_uint ) ;
48054807 let i = 0 u, n = vec:: len ( tys. arg_tys ) ;
48064808 let llargvals = [ ] ;
48074809 while i < n {
@@ -4851,7 +4853,7 @@ fn trans_native_mod(lcx: @local_ctxt, native_mod: ast::native_mod,
48514853 store_inbounds ( bcx, llargval, llargbundle, [ 0 , i as int ] ) ;
48524854 i += 1 u;
48534855 }
4854- let llretptr = llvm:: LLVMGetParam ( llwrapfn, 0u32 ) ;
4856+ let llretptr = llvm:: LLVMGetParam ( llwrapfn, 0 as c_uint ) ;
48554857 store_inbounds ( bcx, llretptr, llargbundle, [ 0 , n as int ] ) ;
48564858
48574859 // Create call itself.
@@ -5036,10 +5038,10 @@ fn create_main_wrapper(ccx: @crate_ctxt, sp: span, main_llfn: ValueRef,
50365038 let bcx = new_top_block_ctxt ( fcx) ;
50375039 let lltop = bcx. llbb ;
50385040
5039- let lloutputarg = llvm:: LLVMGetParam ( llfdecl, 0u32 ) ;
5040- let llenvarg = llvm:: LLVMGetParam ( llfdecl, 1u32 ) ;
5041+ let lloutputarg = llvm:: LLVMGetParam ( llfdecl, 0 as c_uint ) ;
5042+ let llenvarg = llvm:: LLVMGetParam ( llfdecl, 1 as c_uint ) ;
50415043 let args = [ lloutputarg, llenvarg] ;
5042- if takes_argv { args += [ llvm:: LLVMGetParam ( llfdecl, 2u32 ) ] ; }
5044+ if takes_argv { args += [ llvm:: LLVMGetParam ( llfdecl, 2 as c_uint ) ] ; }
50435045 Call ( bcx, main_llfn, args) ;
50445046 build_return ( bcx) ;
50455047
@@ -5070,8 +5072,8 @@ fn create_main_wrapper(ccx: @crate_ctxt, sp: span, main_llfn: ValueRef,
50705072 let start = str:: as_buf ( "rust_start" , { |buf|
50715073 llvm:: LLVMAddGlobal ( ccx. llmod , start_ty, buf)
50725074 } ) ;
5073- let args = [ rust_main, llvm:: LLVMGetParam ( llfn, 0u32 ) ,
5074- llvm:: LLVMGetParam ( llfn, 1u32 ) , crate_map] ;
5075+ let args = [ rust_main, llvm:: LLVMGetParam ( llfn, 0 as c_uint ) ,
5076+ llvm:: LLVMGetParam ( llfn, 1 as c_uint ) , crate_map] ;
50755077 let result = unsafe {
50765078 llvm:: LLVMBuildCall ( bld, start, vec:: to_ptr ( args) ,
50775079 vec:: len ( args) as c_uint , noname ( ) )
0 commit comments