From bc0b172f3b3944eea0a326e032a961d0f5f5df11 Mon Sep 17 00:00:00 2001 From: Mark-Simulacrum Date: Fri, 16 Dec 2016 10:48:46 -0700 Subject: [PATCH] Remove BlockAndBuilder.funclet --- src/librustc_trans/cleanup.rs | 2 +- src/librustc_trans/common.rs | 23 ----------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/src/librustc_trans/cleanup.rs b/src/librustc_trans/cleanup.rs index 67b9dd182884..bd387ccae205 100644 --- a/src/librustc_trans/cleanup.rs +++ b/src/librustc_trans/cleanup.rs @@ -99,7 +99,7 @@ impl<'blk, 'tcx> FunctionContext<'blk, 'tcx> { custom_scope: Option> ) { if let Some(scope) = custom_scope { - scope.cleanup.trans(bcx.funclet(), &bcx); + scope.cleanup.trans(None, &bcx); } } diff --git a/src/librustc_trans/common.rs b/src/librustc_trans/common.rs index e4c3d6497fd7..e2abb7779c98 100644 --- a/src/librustc_trans/common.rs +++ b/src/librustc_trans/common.rs @@ -42,7 +42,6 @@ use rustc::traits::{self, SelectionContext, Reveal}; use rustc::ty::fold::TypeFoldable; use rustc::hir; -use arena::TypedArena; use libc::{c_uint, c_char}; use std::borrow::Cow; use std::iter; @@ -304,9 +303,6 @@ pub struct FunctionContext<'a, 'tcx: 'a> { // error reporting and symbol generation. pub span: Option, - // The arena that landing pads are allocated from. - pub funclet_arena: TypedArena, - // This function's enclosing crate context. pub ccx: &'a CrateContext<'a, 'tcx>, @@ -364,7 +360,6 @@ impl<'a, 'tcx> FunctionContext<'a, 'tcx> { fn_ty: fn_ty, param_substs: param_substs, span: None, - funclet_arena: TypedArena::new(), ccx: ccx, debug_context: debug_context, owned_builder: OwnedBuilder::new_with_ccx(ccx), @@ -564,10 +559,6 @@ pub struct BlockAndBuilder<'blk, 'tcx: 'blk> { // The block pointing to this one in the function's digraph. llbb: BasicBlockRef, - // If this block part of a landing pad, then this is `Some` indicating what - // kind of landing pad its in, otherwise this is none. - funclet: Option<&'blk Funclet>, - // The function context for the function to which this block is // attached. fcx: &'blk FunctionContext<'blk, 'tcx>, @@ -582,7 +573,6 @@ impl<'blk, 'tcx> BlockAndBuilder<'blk, 'tcx> { owned_builder.builder.position_at_end(llbb); BlockAndBuilder { llbb: llbb, - funclet: None, fcx: fcx, owned_builder: owned_builder, } @@ -617,19 +607,6 @@ impl<'blk, 'tcx> BlockAndBuilder<'blk, 'tcx> { pub fn mir(&self) -> Ref<'tcx, Mir<'tcx>> { self.fcx.mir() } - - pub fn set_funclet(&mut self, funclet: Option) { - self.funclet = funclet.map(|p| &*self.fcx().funclet_arena.alloc(p)); - } - - pub fn set_funclet_ref(&mut self, funclet: Option<&'blk Funclet>) { - // FIXME: use an IVar? - self.funclet = funclet; - } - - pub fn funclet(&self) -> Option<&'blk Funclet> { - self.funclet - } } impl<'blk, 'tcx> Deref for BlockAndBuilder<'blk, 'tcx> {