Imported Upstream version 5.8.0.22

Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-10-19 20:04:20 +00:00
parent 5f4a27cc8a
commit 7d05485754
5020 changed files with 114082 additions and 186061 deletions

View File

@ -63,14 +63,16 @@ namespace Mono.ILASM {
private string output_file;
private bool is_dll;
private bool entry_point;
bool noautoinherit;
private Module this_module;
public CodeGen (string output_file, bool is_dll, bool debugging_info)
public CodeGen (string output_file, bool is_dll, bool debugging_info, bool noautoinherit)
{
this.output_file = output_file;
this.is_dll = is_dll;
this.noautoinherit = noautoinherit;
if (debugging_info)
symwriter = new SymbolWriter (output_file);
@ -313,7 +315,7 @@ namespace Mono.ILASM {
typedef = new TypeDef (attr, current_namespace,
name, parent, impl_list, location, gen_params, outer);
typedef.NoAutoInherit = noautoinherit && parent == null;
type_manager[cache_name] = typedef;
current_customattrtarget = current_typedef = typedef;
current_declsectarget = typedef;

View File

@ -93,6 +93,8 @@ namespace Mono.ILASM {
this.attr |= PEAPI.TypeAttr.Abstract;
}
public bool NoAutoInherit { get; set; }
public string Name {
get { return name; }
}
@ -389,7 +391,7 @@ namespace Mono.ILASM {
name_space, name);
}
}
if (FullName == "System.Object")
if (FullName == "System.Object" || NoAutoInherit)
classdef.SpecialNoSuper ();
}