[sgen] Restore hazard pointers in suspend signal handler. Fixes #15695.
[mono.git] / mcs / ilasm / codegen / Module.cs
index 29a8881a5ade519a93ada913b4638f737cca78b5..32ca848fbd108e4c55881f944e57726a1ff1628d 100644 (file)
@@ -12,30 +12,42 @@ using System.Collections;
 
 namespace Mono.ILASM {
 
-        public class Module : ICustomAttrTarget {
-                string name;
-                ArrayList customattr_list;
+        public class Module : ExternRef {
+
+                PEAPI.Module module;
 
                 public Module (string name)
+                        : base (name)
                 {
-                        this.name = name;
-                        customattr_list = null;
                 }
 
-                public string Name {
-                        get { return name; }
+                public PEAPI.Module PeapiModule {
+                        get { return module; }
+                        set { module = value; }
+                }
+
+                public override string FullName {
+                        get { 
+                                //'name' field should not contain the [ ]
+                                //as its used for resolving
+                                return String.Format ("[{0}]", name); 
+                        }
                 }
 
-                public void AddCustomAttribute (CustomAttr customattr)
+                public override PEAPI.IExternRef GetExternRef ()
                 {
-                        if (customattr_list == null)
-                                customattr_list = new ArrayList ();
+                        return module;
+                }
 
-                        customattr_list.Add (customattr);
+                public override void Resolve (CodeGen code_gen)
+                {
+                        throw new InternalErrorException ("This should not get called");
                 }
 
                 public void Resolve (CodeGen code_gen, PEAPI.Module module)
                 {
+                        this.module = module;
+
                         if (customattr_list == null)
                                 return;