@@ -81,10 +81,6 @@ pub struct FunctionCx<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> {
8181
8282 /// Debug information for MIR scopes.
8383 scopes : IndexVec < mir:: SourceScope , debuginfo:: MirDebugScope < Bx :: DIScope > > ,
84-
85- /// If this function is a C-variadic function, this contains the `PlaceRef` of the
86- /// "spoofed" `VaListImpl`.
87- va_list_ref : Option < PlaceRef < ' tcx , Bx :: Value > > ,
8884}
8985
9086impl < ' a , ' tcx , Bx : BuilderMethods < ' a , ' tcx > > FunctionCx < ' a , ' tcx , Bx > {
@@ -236,18 +232,13 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
236232 scopes,
237233 locals : IndexVec :: new ( ) ,
238234 debug_context,
239- va_list_ref : None ,
240235 } ;
241236
242237 let memory_locals = analyze:: non_ssa_locals ( & fx) ;
243238
244239 // Allocate variable and temp allocas
245240 fx. locals = {
246- // FIXME(dlrobertson): This is ugly. Find a better way of getting the `PlaceRef` or
247- // `LocalRef` from `arg_local_refs`
248- let mut va_list_ref = None ;
249- let args = arg_local_refs ( & mut bx, & fx, & memory_locals, & mut va_list_ref) ;
250- fx. va_list_ref = va_list_ref;
241+ let args = arg_local_refs ( & mut bx, & fx, & memory_locals) ;
251242
252243 let mut allocate_local = |local| {
253244 let decl = & mir. local_decls [ local] ;
@@ -426,7 +417,6 @@ fn arg_local_refs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
426417 bx : & mut Bx ,
427418 fx : & FunctionCx < ' a , ' tcx , Bx > ,
428419 memory_locals : & BitSet < mir:: Local > ,
429- va_list_ref : & mut Option < PlaceRef < ' tcx , Bx :: Value > > ,
430420) -> Vec < LocalRef < ' tcx , Bx :: Value > > {
431421 let mir = fx. mir ;
432422 let tcx = fx. cx . tcx ( ) ;
@@ -500,8 +490,6 @@ fn arg_local_refs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
500490 let va_list = PlaceRef :: alloca ( bx, bx. layout_of ( arg_ty) ) ;
501491 bx. set_var_name ( va_list. llval , name) ;
502492 bx. va_start ( va_list. llval ) ;
503- // FIXME(eddyb) remove `va_list_ref`.
504- * va_list_ref = Some ( va_list) ;
505493
506494 arg_scope. map ( |scope| {
507495 let variable_access = VariableAccess :: DirectVariable {
0 commit comments