Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,26 @@
<!-- Roslyn Analyzers ***MUST*** target older framework -->
<PackageVersion Include="AnsiCodes" Version="0.2.1" />
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.0.0" />

<!--
NOTE: These CA packages are NOT updated to 5.0, which IDE NuGet management suggests is compatible but is NOT.
Upgrading to 5.0.0 or later REQUIRES .NET10 SDK which is not yet tested.
-->
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Features" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.Features" Version="4.14.0" />

<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.SourceGenerators.Testing" Version="1.1.2" />
<PackageVersion Include="Basic.Reference.Assemblies.Net80" Version="1.8.3" />
<PackageVersion Include="PolySharp" Version="1.15.0" />
<PackageVersion Include="System.Buffers" Version="4.6.1" />
<PackageVersion Include="System.Collections.Immutable" Version="9.0.10" />
<PackageVersion Include="System.Memory" Version="4.5.5" />

<!-- Currently, only in preview -->
<PackageVersion Include="System.CommandLine" Version="2.0.0" />

<!--
Expand Down Expand Up @@ -67,8 +71,13 @@
<PackageVersion Include="Antlr4BuildTasks" Version="12.11.0" />
<PackageVersion Include="Antlr4.Runtime.Standard" Version="4.13.1" />
<PackageVersion Include="OpenSoftware.DgmlBuilder" Version="2.1.0" />
<PackageVersion Include="System.CodeDom" Version="10.0.0" />

<!--
NOTE: A newer version of this exists but it requires targeting .NET 9 that's a breaking change
and not properly reported via NuGet dependencies.
-->
<PackageVersion Include="CppSharp" Version="1.1.5.3168" />
<PackageVersion Include="System.CodeDom" Version="9.0.7" />

<!-- Tests all use the same framework versions -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
Expand Down
11 changes: 10 additions & 1 deletion IgnoredWords.dic
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ buildtransitive
builtinop
byref
byval
cacheable
callee
canonicalization
castable
Expand Down Expand Up @@ -66,6 +67,7 @@ enum
Enums
env
exe
façade
facepalm
fallback
finalizer
Expand All @@ -79,17 +81,19 @@ gh
github
gitignore
Globalization
Globals
Hashtable
Identifier
ifunc
Impl
initializer
initializers
inline
inlined
inlining
Interop
ints
Invokable
invocable
jit
len
Lexer
Expand All @@ -102,6 +106,7 @@ llvmversion
lookups
LValue
malloc
marshalers
marshallers
marshalling
materializer
Expand All @@ -119,10 +124,12 @@ namespaces
nav
nint
noinline
noogies
nounwind
nuint
nullability
Nullable
nullptr
numerics
Nvidia
online
Expand Down Expand Up @@ -184,6 +191,8 @@ unmarshal
unoptimized
unreferenced
Unshipped
untrusted
untyped
userdefinedop
Users
usings
Expand Down
6 changes: 3 additions & 3 deletions docfx/llvm/articles/InternalDetails/llvm-handles.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ forms:
>[!NOTE]
> The generated sources are not useful outside of the `Ubiquity.NET.Llvm.Interop` as they
> use classes within that as a base class. These are generated manually via the
> `Generate-HandleWrappers.ps1` script. With the sources checked in to the repository. This
> is done once for any updates to the LibLLVM package to ensure the handles are kept up to
> date with the underlying native library.
> `Generate-HandleWrappers.ps1` script with the sources checked in to the repository. This
> is done once for any updates to the `Ubiquity.NET.LibLLVM` package to ensure the handles
> are kept up to date with the underlying native library.

### Contextual handles and Aliases
These handles are never manually released or disposed, though releasing their containers
Expand Down
4 changes: 2 additions & 2 deletions src/Interop/LlvmBindingsGenerator/CmdLineArgs.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ internal static readonly Option<DirectoryInfo> LlvmRoot
= new Option<DirectoryInfo>("-l")
{
Required = true,
Description = "Root of source with the LLVM headers to parse (Assumes and validates a subfolder 'include')",
Description = "Root of source with the LLVM headers to parse (Assumes and validates a sub-folder 'include')",
}.AcceptExistingFolderOnly()
.AddValidator(CmdLineArgs.ValidateIncludeFolder);

internal static readonly Option<DirectoryInfo> ExtensionsRoot
= new Option<DirectoryInfo>("-e")
{
Required = true,
Description = "Root of source with the LibLLVM extension headers to parse (Assumes and validates a subfolder 'include')",
Description = "Root of source with the LibLLVM extension headers to parse (Assumes and validates a sub-folder 'include')",
}.AcceptExistingFolderOnly()
.AddValidator(CmdLineArgs.ValidateIncludeFolder);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
NOTE: This isn't directly used by this project. However, it allows for scripts to restore this project, which
guarantees the package is available, so that running it can use the contained headers as input.
-->
<PackageReference Include="Ubiquity.NET.LibLLVM" VersionOverride="20.1.*-*" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Ubiquity.NET.LibLLVM" GeneratePathProperty="true" PrivateAssets="all" />
</ItemGroup>

<!-- Runtime T4 templates need to specify the single file generator for the code behind -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public static nint CreateForNativeOut( LazyEncodedString errMsg )
}

/// <summary>Create a new <see cref="LLVMErrorRef"/> as <see cref="nint"/> from <see cref="Exception.Message"/></summary>
/// <param name="ex">Exceotion to get the error message from</param>
/// <param name="ex">Exception to get the error message from</param>
/// <inheritdoc cref="CreateForNativeOut(LazyEncodedString)"/>
public static nint CreateForNativeOut( Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static partial class AttributeBindings
[UnmanagedCallConv( CallConvs = [ typeof( CallConvCdecl ) ] )]
public static unsafe partial nuint LibLLVMGetNumKnownAttribs( );

// Fills in an array of const string pointers. No deallocation is needed for each as
// Fills in an array of const string pointers. No de-allocation is needed for each as
// they are global static constants.

[LibraryImport( LibraryName )]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Ubiquity.NET.Llvm.Interop
{
// This does NOT use the new C# 14 extension syntax due to several reasons
// 1) Code lens does not work https://github.com/dotnet/roslyn/issues/79006 [Sadly, marked as "not planned" - e.g., dead-end]
// 2) MANY analyzers get things wrong and need to be supressed (CA1000, CA1034, and many others [SAxxxx])
// 2) MANY analyzers get things wrong and need to be suppressed (CA1000, CA1034, and many others [SAxxxx])
// 3) Many tools (like docfx) don't support the new syntax yet and it isn't clear if they will in the future.
// 4) No clear support for Caller* attributes ([CallerArgumentExpression(...)]).
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Ubiquity.NET.Llvm.Interop
{
// This does NOT use the new C# 14 extension syntax due to several reasons
// 1) Code lens does not work https://github.com/dotnet/roslyn/issues/79006 [Sadly, marked as "not planned" - e.g., dead-end]
// 2) MANY analyzers get things wrong and need to be supressed (CA1000, CA1034, and many others [SAxxxx])
// 2) MANY analyzers get things wrong and need to be suppressed (CA1000, CA1034, and many others [SAxxxx])
// 3) Many tools (like docfx) don't support the new syntax yet and it isn't clear if they will in the future.
// 4) No clear support for Caller* attributes ([CallerArgumentExpression(...)]).
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool. [LlvmBindingsGenerator]
// Tool Version: 20.1.9-epsilon.0.0.ci.618434732.ZZZ
// Tool Version: 20.1.9-rc.1.0.ci.619607372.ZZZ
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down Expand Up @@ -31,7 +31,7 @@ namespace Ubiquity.NET.Llvm.Interop
/// behavior, including, and most likely, memory access violations.
/// </note>
/// </remarks>
[GeneratedCode("LlvmBindingsGenerator","20.1.9-epsilon.0.0.ci.618434732.ZZZ")]
[GeneratedCode("LlvmBindingsGenerator","20.1.9-rc.1.0.ci.619607372.ZZZ")]
[NativeMarshalling(typeof(WrappedHandleMarshaller<LLVMAttributeRef>))]
public readonly record struct LLVMAttributeRef
: IWrappedHandle<LLVMAttributeRef>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool. [LlvmBindingsGenerator]
// Tool Version: 20.1.9-epsilon.0.0.ci.618434732.ZZZ
// Tool Version: 20.1.9-rc.1.0.ci.619607372.ZZZ
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down Expand Up @@ -31,7 +31,7 @@ namespace Ubiquity.NET.Llvm.Interop
/// behavior, including, and most likely, memory access violations.
/// </note>
/// </remarks>
[GeneratedCode("LlvmBindingsGenerator","20.1.9-epsilon.0.0.ci.618434732.ZZZ")]
[GeneratedCode("LlvmBindingsGenerator","20.1.9-rc.1.0.ci.619607372.ZZZ")]
[NativeMarshalling(typeof(WrappedHandleMarshaller<LLVMBasicBlockRef>))]
public readonly record struct LLVMBasicBlockRef
: IWrappedHandle<LLVMBasicBlockRef>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool. [LlvmBindingsGenerator]
// Tool Version: 20.1.9-epsilon.0.0.ci.618434732.ZZZ
// Tool Version: 20.1.9-rc.1.0.ci.619607372.ZZZ
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down Expand Up @@ -35,7 +35,7 @@ namespace Ubiquity.NET.Llvm.Interop
/// correct usage.
/// </note>
/// </remarks>
[GeneratedCode("LlvmBindingsGenerator","20.1.9-epsilon.0.0.ci.618434732.ZZZ")]
[GeneratedCode("LlvmBindingsGenerator","20.1.9-rc.1.0.ci.619607372.ZZZ")]
[NativeMarshalling(typeof(WrappedHandleMarshaller<LLVMBinaryRef>))]
public readonly record struct LLVMBinaryRef
: IWrappedHandle<LLVMBinaryRef>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool. [LlvmBindingsGenerator]
// Tool Version: 20.1.9-epsilon.0.0.ci.618434732.ZZZ
// Tool Version: 20.1.9-rc.1.0.ci.619607372.ZZZ
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down Expand Up @@ -35,7 +35,7 @@ namespace Ubiquity.NET.Llvm.Interop
/// correct usage.
/// </note>
/// </remarks>
[GeneratedCode("LlvmBindingsGenerator","20.1.9-epsilon.0.0.ci.618434732.ZZZ")]
[GeneratedCode("LlvmBindingsGenerator","20.1.9-rc.1.0.ci.619607372.ZZZ")]
[NativeMarshalling(typeof(WrappedHandleMarshaller<LLVMBuilderRef>))]
public readonly record struct LLVMBuilderRef
: IWrappedHandle<LLVMBuilderRef>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool. [LlvmBindingsGenerator]
// Tool Version: 20.1.9-epsilon.0.0.ci.618434732.ZZZ
// Tool Version: 20.1.9-rc.1.0.ci.619607372.ZZZ
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down Expand Up @@ -31,7 +31,7 @@ namespace Ubiquity.NET.Llvm.Interop
/// behavior, including, and most likely, memory access violations.
/// </note>
/// </remarks>
[GeneratedCode("LlvmBindingsGenerator","20.1.9-epsilon.0.0.ci.618434732.ZZZ")]
[GeneratedCode("LlvmBindingsGenerator","20.1.9-rc.1.0.ci.619607372.ZZZ")]
[NativeMarshalling(typeof(WrappedHandleMarshaller<LLVMComdatRef>))]
public readonly record struct LLVMComdatRef
: IWrappedHandle<LLVMComdatRef>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool. [LlvmBindingsGenerator]
// Tool Version: 20.1.9-epsilon.0.0.ci.618434732.ZZZ
// Tool Version: 20.1.9-rc.1.0.ci.619607372.ZZZ
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down Expand Up @@ -35,7 +35,7 @@ namespace Ubiquity.NET.Llvm.Interop
/// correct usage.
/// </note>
/// </remarks>
[GeneratedCode("LlvmBindingsGenerator","20.1.9-epsilon.0.0.ci.618434732.ZZZ")]
[GeneratedCode("LlvmBindingsGenerator","20.1.9-rc.1.0.ci.619607372.ZZZ")]
[NativeMarshalling(typeof(WrappedHandleMarshaller<LLVMContextRef>))]
public readonly record struct LLVMContextRef
: IWrappedHandle<LLVMContextRef>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool. [LlvmBindingsGenerator]
// Tool Version: 20.1.9-epsilon.0.0.ci.618434732.ZZZ
// Tool Version: 20.1.9-rc.1.0.ci.619607372.ZZZ
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down Expand Up @@ -31,7 +31,7 @@ namespace Ubiquity.NET.Llvm.Interop
/// behavior, including, and most likely, memory access violations.
/// </note>
/// </remarks>
[GeneratedCode("LlvmBindingsGenerator","20.1.9-epsilon.0.0.ci.618434732.ZZZ")]
[GeneratedCode("LlvmBindingsGenerator","20.1.9-rc.1.0.ci.619607372.ZZZ")]
[NativeMarshalling(typeof(WrappedHandleMarshaller<LLVMContextRefAlias>))]
public readonly record struct LLVMContextRefAlias
: IWrappedHandle<LLVMContextRefAlias>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool. [LlvmBindingsGenerator]
// Tool Version: 20.1.9-epsilon.0.0.ci.618434732.ZZZ
// Tool Version: 20.1.9-rc.1.0.ci.619607372.ZZZ
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down Expand Up @@ -35,7 +35,7 @@ namespace Ubiquity.NET.Llvm.Interop
/// correct usage.
/// </note>
/// </remarks>
[GeneratedCode("LlvmBindingsGenerator","20.1.9-epsilon.0.0.ci.618434732.ZZZ")]
[GeneratedCode("LlvmBindingsGenerator","20.1.9-rc.1.0.ci.619607372.ZZZ")]
[NativeMarshalling(typeof(WrappedHandleMarshaller<LLVMDIBuilderRef>))]
public readonly record struct LLVMDIBuilderRef
: IWrappedHandle<LLVMDIBuilderRef>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool. [LlvmBindingsGenerator]
// Tool Version: 20.1.9-epsilon.0.0.ci.618434732.ZZZ
// Tool Version: 20.1.9-rc.1.0.ci.619607372.ZZZ
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down Expand Up @@ -31,7 +31,7 @@ namespace Ubiquity.NET.Llvm.Interop
/// behavior, including, and most likely, memory access violations.
/// </note>
/// </remarks>
[GeneratedCode("LlvmBindingsGenerator","20.1.9-epsilon.0.0.ci.618434732.ZZZ")]
[GeneratedCode("LlvmBindingsGenerator","20.1.9-rc.1.0.ci.619607372.ZZZ")]
[NativeMarshalling(typeof(WrappedHandleMarshaller<LLVMDbgRecordRef>))]
public readonly record struct LLVMDbgRecordRef
: IWrappedHandle<LLVMDbgRecordRef>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool. [LlvmBindingsGenerator]
// Tool Version: 20.1.9-epsilon.0.0.ci.618434732.ZZZ
// Tool Version: 20.1.9-rc.1.0.ci.619607372.ZZZ
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down Expand Up @@ -31,7 +31,7 @@ namespace Ubiquity.NET.Llvm.Interop
/// behavior, including, and most likely, memory access violations.
/// </note>
/// </remarks>
[GeneratedCode("LlvmBindingsGenerator","20.1.9-epsilon.0.0.ci.618434732.ZZZ")]
[GeneratedCode("LlvmBindingsGenerator","20.1.9-rc.1.0.ci.619607372.ZZZ")]
[NativeMarshalling(typeof(WrappedHandleMarshaller<LLVMDiagnosticInfoRef>))]
public readonly record struct LLVMDiagnosticInfoRef
: IWrappedHandle<LLVMDiagnosticInfoRef>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool. [LlvmBindingsGenerator]
// Tool Version: 20.1.9-epsilon.0.0.ci.618434732.ZZZ
// Tool Version: 20.1.9-rc.1.0.ci.619607372.ZZZ
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down Expand Up @@ -35,7 +35,7 @@ namespace Ubiquity.NET.Llvm.Interop
/// correct usage.
/// </note>
/// </remarks>
[GeneratedCode("LlvmBindingsGenerator","20.1.9-epsilon.0.0.ci.618434732.ZZZ")]
[GeneratedCode("LlvmBindingsGenerator","20.1.9-rc.1.0.ci.619607372.ZZZ")]
[NativeMarshalling(typeof(WrappedHandleMarshaller<LLVMDisasmContextRef>))]
public readonly record struct LLVMDisasmContextRef
: IWrappedHandle<LLVMDisasmContextRef>
Expand Down
Loading
Loading