diff options
| author | Mark-Simulacrum <mark.simulacrum@gmail.com> | 2016-12-16 10:48:46 -0700 |
|---|---|---|
| committer | Mark Simulacrum <mark.simulacrum@gmail.com> | 2016-12-20 20:02:53 -0700 |
| commit | bc0b172f3b3944eea0a326e032a961d0f5f5df11 (patch) | |
| tree | 5671232d6d939d5c734161780c5c6173afa2e417 /src | |
| parent | 28f511cfbd9faaec4cc54ea002b43bacb3da497c (diff) | |
| download | rust-bc0b172f3b3944eea0a326e032a961d0f5f5df11.tar.gz rust-bc0b172f3b3944eea0a326e032a961d0f5f5df11.zip | |
Remove BlockAndBuilder.funclet
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_trans/cleanup.rs | 2 | ||||
| -rw-r--r-- | src/librustc_trans/common.rs | 23 |
2 files changed, 1 insertions, 24 deletions
diff --git a/src/librustc_trans/cleanup.rs b/src/librustc_trans/cleanup.rs index 67b9dd18288..bd387ccae20 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<CleanupScope<'tcx>> ) { 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 e4c3d6497fd..e2abb7779c9 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<Span>, - // The arena that landing pads are allocated from. - pub funclet_arena: TypedArena<Funclet>, - // 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<Funclet>) { - 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> { |
