(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / ilasm / codegen / LabelInfo.cs
blobbc1037db82a118c47dac4b8cac7d61f239aa6ea2
1 //
2 // Mono.ILASM.LabelInfo
3 //
4 // Author(s):
5 // Jackson Harper (Jackson@LatitudeGeo.com)
6 //
7 // (C) 2003 Jackson Harper, All rights reserved
8 //
10 using System;
12 namespace Mono.ILASM {
14 public class LabelInfo : IComparable {
16 public readonly string Name;
17 public readonly int Pos;
18 public readonly uint Offset;
19 public PEAPI.CILLabel Label;
20 public bool UseOffset;
22 public LabelInfo (string name, int pos, uint offset)
24 Name = name;
25 Pos = pos;
26 Offset = offset;
27 Label = null;
28 UseOffset = true;
31 public LabelInfo (string name, int pos)
33 Name = name;
34 Pos = pos;
35 Label = null;
36 UseOffset = false;
39 public void Define (PEAPI.CILLabel label)
41 Label = label;
44 public int CompareTo (object obj)
46 LabelInfo other = obj as LabelInfo;
48 if(other != null)
49 return Pos.CompareTo(other.Pos);
51 throw new ArgumentException ("object is not a LabelInfo");
54 public override string ToString ()
56 if (Name != null)
57 return Name;
58 return "IL_" + Pos;