2010-04-07 Jb Evain <jbevain@novell.com>
[mcs.git] / ilasm / codegen / FaultBlock.cs
blob34609712dcb42a0de713dac3736bb8c9e604e36d
1 //
2 // Mono.ILASM.FaultBlock
3 //
4 // Author(s):
5 // Jackson Harper (Jackson@LatitudeGeo.com)
6 //
7 // (C) 2003 Jackson Harper, All rights reserved
8 //
11 using System;
13 namespace Mono.ILASM {
15 public class FaultBlock : ISehClause {
17 private HandlerBlock handler_block;
19 public FaultBlock ()
24 public void SetHandlerBlock (HandlerBlock hb)
26 handler_block = hb;
29 public PEAPI.HandlerBlock Resolve (CodeGen code_gen, MethodDef method)
31 PEAPI.CILLabel from = handler_block.GetFromLabel (code_gen, method);
32 PEAPI.CILLabel to = handler_block.GetToLabel (code_gen, method);
33 PEAPI.Fault fault = new PEAPI.Fault (from, to);
35 return fault;