Skip to content

Commit

Permalink
UnmanagedCallersOnlyAttribute is unsupported (#12350)
Browse files Browse the repository at this point in the history
  • Loading branch information
Happypig375 authored Nov 23, 2021
1 parent edd4c3b commit ee93e05
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/fsharp/TcGlobals.fs
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,12 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d
| true, builder -> builder tinst
| _ -> TType_app (tcref, tinst)

// Adding an unnecessary "let" instead of inlining into a muiti-line pipelined compute-once "member val" that is too complex for @dsyme
let v_attribs_Unsupported = [
tryFindSysAttrib "System.Runtime.CompilerServices.ModuleInitializerAttribute"
tryFindSysAttrib "System.Runtime.CompilerServices.CallerArgumentExpressionAttribute"
tryFindSysAttrib "System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute"
] |> List.choose (Option.map (fun x -> x.TyconRef))

override x.ToString() = "<TcGlobals>"
member _.ilg=ilg
Expand Down Expand Up @@ -1224,10 +1230,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d
member val attrib_CallerFilePathAttribute = findSysAttrib "System.Runtime.CompilerServices.CallerFilePathAttribute"
member val attrib_CallerMemberNameAttribute = findSysAttrib "System.Runtime.CompilerServices.CallerMemberNameAttribute"
member val attrib_SkipLocalsInitAttribute = findSysAttrib "System.Runtime.CompilerServices.SkipLocalsInitAttribute"
member val attribs_Unsupported = [
tryFindSysAttrib "System.Runtime.CompilerServices.ModuleInitializerAttribute"
tryFindSysAttrib "System.Runtime.CompilerServices.CallerArgumentExpressionAttribute"
] |> List.choose (Option.map (fun x -> x.TyconRef))
member val attribs_Unsupported = v_attribs_Unsupported

member val attrib_ProjectionParameterAttribute = mk_MFCore_attrib "ProjectionParameterAttribute"
member val attrib_CustomOperationAttribute = mk_MFCore_attrib "CustomOperationAttribute"
Expand Down

0 comments on commit ee93e05

Please sign in to comment.