bool is_cls_compliant;
bool wrap_non_exception_throws;
bool wrap_non_exception_throws_custom;
+ bool has_user_debuggable;
protected ModuleContainer module;
readonly string name;
vi_copyright = a.GetString ();
} else if (a.Type == pa.AssemblyTrademark) {
vi_trademark = a.GetString ();
+ } else if (a.Type == pa.Debuggable) {
+ has_user_debuggable = true;
}
SetCustomAttribute (ctor, cdata);
}
if (!IsSatelliteAssembly) {
+ if (!has_user_debuggable && Compiler.Settings.GenerateDebugInfo) {
+ var pa = module.PredefinedAttributes.Debuggable;
+ if (pa.IsDefined) {
+ var modes = System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints;
+ if (!Compiler.Settings.Optimize)
+ modes |= System.Diagnostics.DebuggableAttribute.DebuggingModes.DisableOptimizations;
+
+ pa.EmitAttribute (Builder, modes);
+ }
+ }
+
if (!wrap_non_exception_throws_custom) {
PredefinedAttribute pa = module.PredefinedAttributes.RuntimeCompatibility;
if (pa.IsDefined && pa.ResolveBuilder ()) {
return;
}
- var mtype = texpr.Type.MemberDefinition as ClassOrStruct;
+ var mtype = texpr.MemberDefinition as ClassOrStruct;
if (mtype == null) {
Report.Error (1556, "`{0}' specified for Main method must be a valid class or struct", main_class);
return;
}
}
- abstract class AssemblyReferencesLoader<T>
+ abstract class AssemblyReferencesLoader<T> where T : class
{
protected readonly CompilerContext compiler;
protected readonly List<string> paths;
- public AssemblyReferencesLoader (CompilerContext compiler)
+ protected AssemblyReferencesLoader (CompilerContext compiler)
{
this.compiler = compiler;