@@ -232,7 +232,7 @@ pub fn lazily_emit_tydesc_glue(ccx: @mut CrateContext,
232232 field : uint ,
233233 ti : @mut tydesc_info ) {
234234 let _icx = push_ctxt ( "lazily_emit_tydesc_glue" ) ;
235- let llfnty = type_of_glue_fn ( ccx ) ;
235+ let llfnty = Type :: glue_fn ( ) ;
236236
237237 if lazily_emit_simplified_tydesc_glue ( ccx, field, ti) {
238238 return ;
@@ -338,9 +338,7 @@ pub fn call_tydesc_glue_full(bcx: block,
338338 }
339339 } ;
340340
341- Call ( bcx, llfn, [ C_null ( Type :: nil ( ) . ptr_to ( ) ) ,
342- C_null ( bcx. ccx ( ) . tydesc_type . ptr_to ( ) . ptr_to ( ) ) ,
343- llrawptr] ) ;
341+ Call ( bcx, llfn, [ C_null ( Type :: nil ( ) . ptr_to ( ) ) , llrawptr] ) ;
344342}
345343
346344// See [Note-arg-mode]
@@ -680,7 +678,7 @@ pub fn make_generic_glue_inner(ccx: @mut CrateContext,
680678
681679 let bcx = top_scope_block ( fcx, None ) ;
682680 let lltop = bcx. llbb ;
683- let rawptr0_arg = fcx. arg_pos ( 1 u ) ;
681+ let rawptr0_arg = fcx. arg_pos ( 0 u ) ;
684682 let llrawptr0 = unsafe { llvm:: LLVMGetParam ( llfn, rawptr0_arg as c_uint ) } ;
685683 let llty = type_of ( ccx, t) ;
686684 let llrawptr0 = PointerCast ( bcx, llrawptr0, llty. ptr_to ( ) ) ;
@@ -715,7 +713,7 @@ pub fn emit_tydescs(ccx: &mut CrateContext) {
715713 let _icx = push_ctxt ( "emit_tydescs" ) ;
716714 // As of this point, allow no more tydescs to be created.
717715 ccx. finished_tydescs = true ;
718- let glue_fn_ty = Type :: generic_glue_fn ( ccx) ;
716+ let glue_fn_ty = Type :: generic_glue_fn ( ccx) . ptr_to ( ) ;
719717 let tyds = & mut ccx. tydescs ;
720718 for tyds. each_value |& val| {
721719 let ti = val;
@@ -782,7 +780,3 @@ pub fn emit_tydescs(ccx: &mut CrateContext) {
782780 }
783781 } ;
784782}
785-
786- pub fn type_of_glue_fn ( ccx : & CrateContext ) -> Type {
787- Type :: glue_fn ( ccx. tydesc_type )
788- }
0 commit comments