@@ -81,10 +81,6 @@ pub struct FunctionCx<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> {
81
81
82
82
/// Debug information for MIR scopes.
83
83
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 > > ,
88
84
}
89
85
90
86
impl < ' a , ' tcx , Bx : BuilderMethods < ' a , ' tcx > > FunctionCx < ' a , ' tcx , Bx > {
@@ -236,18 +232,13 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
236
232
scopes,
237
233
locals : IndexVec :: new ( ) ,
238
234
debug_context,
239
- va_list_ref : None ,
240
235
} ;
241
236
242
237
let memory_locals = analyze:: non_ssa_locals ( & fx) ;
243
238
244
239
// Allocate variable and temp allocas
245
240
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) ;
251
242
252
243
let mut allocate_local = |local| {
253
244
let decl = & mir. local_decls [ local] ;
@@ -426,7 +417,6 @@ fn arg_local_refs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
426
417
bx : & mut Bx ,
427
418
fx : & FunctionCx < ' a , ' tcx , Bx > ,
428
419
memory_locals : & BitSet < mir:: Local > ,
429
- va_list_ref : & mut Option < PlaceRef < ' tcx , Bx :: Value > > ,
430
420
) -> Vec < LocalRef < ' tcx , Bx :: Value > > {
431
421
let mir = fx. mir ;
432
422
let tcx = fx. cx . tcx ( ) ;
@@ -500,8 +490,6 @@ fn arg_local_refs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
500
490
let va_list = PlaceRef :: alloca ( bx, bx. layout_of ( arg_ty) ) ;
501
491
bx. set_var_name ( va_list. llval , name) ;
502
492
bx. va_start ( va_list. llval ) ;
503
- // FIXME(eddyb) remove `va_list_ref`.
504
- * va_list_ref = Some ( va_list) ;
505
493
506
494
arg_scope. map ( |scope| {
507
495
let variable_access = VariableAccess :: DirectVariable {
0 commit comments