X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Fattribute.cs;h=ae9627e93be4b709c507235b19a347622c154bc1;hb=032d867a7d3a1d0fc23f3e1b90e27c1d2908fc69;hp=b0f3b00441017cf3999f91f339987b78d1862db4;hpb=559c3363e20c745b60c259501dd917d4aa3cc71c;p=mono.git diff --git a/mcs/mcs/attribute.cs b/mcs/mcs/attribute.cs index b0f3b004410..ae9627e93be 100644 --- a/mcs/mcs/attribute.cs +++ b/mcs/mcs/attribute.cs @@ -897,6 +897,11 @@ namespace Mono.CSharp { // Returns true for MethodImplAttribute with MethodImplOptions.InternalCall value // public bool IsInternalCall () + { + return (GetMethodImplOptions () & MethodImplOptions.InternalCall) != 0; + } + + public MethodImplOptions GetMethodImplOptions () { MethodImplOptions options = 0; if (pos_args.Count == 1) { @@ -906,7 +911,7 @@ namespace Mono.CSharp { options = (MethodImplOptions) System.Enum.Parse (typeof (MethodImplOptions), named.GetValue ().ToString ()); } - return (options & MethodImplOptions.InternalCall) != 0; + return options; } // @@ -1612,6 +1617,9 @@ namespace Mono.CSharp { public readonly PredefinedDecimalAttribute DecimalConstant; public readonly PredefinedAttribute StructLayout; public readonly PredefinedAttribute FieldOffset; + public readonly PredefinedAttribute CallerMemberNameAttribute; + public readonly PredefinedAttribute CallerLineNumberAttribute; + public readonly PredefinedAttribute CallerFilePathAttribute; public PredefinedAttributes (ModuleContainer module) { @@ -1663,6 +1671,10 @@ namespace Mono.CSharp { StructLayout = new PredefinedAttribute (module, "System.Runtime.InteropServices", "StructLayoutAttribute"); FieldOffset = new PredefinedAttribute (module, "System.Runtime.InteropServices", "FieldOffsetAttribute"); + CallerMemberNameAttribute = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "CallerMemberNameAttribute"); + CallerLineNumberAttribute = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "CallerLineNumberAttribute"); + CallerFilePathAttribute = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "CallerFilePathAttribute"); + // TODO: Should define only attributes which are used for comparison const System.Reflection.BindingFlags all_fields = System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.DeclaredOnly;