зеркало из https://github.com/dotnet/LLVMSharp.git
Merge pull request #197 from tannergooding/main
Regenerating bindings for LLVM v15.0.0
This commit is contained in:
Коммит
f5708931b3
|
@ -25,7 +25,7 @@
|
|||
<DebugType>embedded</DebugType>
|
||||
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
<Nullable>disable</Nullable>
|
||||
<Nullable>enable</Nullable>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
|
||||
|
@ -45,7 +45,7 @@
|
|||
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(Configuration)/</PackageOutputPath>
|
||||
<Product>LLVMSharp</Product>
|
||||
<RootNamespace>LLVMSharp</RootNamespace>
|
||||
<VersionPrefix>14.0.0</VersionPrefix>
|
||||
<VersionPrefix>15.0.0</VersionPrefix>
|
||||
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">beta1</VersionSuffix>
|
||||
<VersionSuffix Condition="'$(GITHUB_EVENT_NAME)' == 'pull_request'">pr</VersionSuffix>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<!-- Settings that append the existing setting value -->
|
||||
<PropertyGroup>
|
||||
<NoWarn>$(NoWarn)</NoWarn>
|
||||
<NoWarn>$(NoWarn);AD0001</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Settings that are only set for CI builds -->
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<!-- Package versions for package references across all projects -->
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="libLLVM" Version="14.0.0" />
|
||||
<PackageVersion Include="libLLVM" Version="15.0.0" />
|
||||
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
|
||||
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
|
||||
|
|
|
@ -99,9 +99,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libLLVM.runtime.win-x86", "
|
|||
packages\libLLVM\libLLVM.runtime.win-x86\libLLVM.runtime.win-x86.nuspec = packages\libLLVM\libLLVM.runtime.win-x86\libLLVM.runtime.win-x86.nuspec
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libLLVM.runtime.ubuntu.21.10-x64", "libLLVM.runtime.ubuntu.21.10-x64", "{1808D302-0067-4121-964C-2CBAFB8A957A}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libLLVM.runtime.ubuntu.22.04-x64", "libLLVM.runtime.ubuntu.22.04-x64", "{1808D302-0067-4121-964C-2CBAFB8A957A}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
packages\libLLVM\libLLVM.runtime.ubuntu.21.10-x64\libLLVM.runtime.ubuntu.21.10-x64.nuspec = packages\libLLVM\libLLVM.runtime.ubuntu.21.10-x64\libLLVM.runtime.ubuntu.21.10-x64.nuspec
|
||||
packages\libLLVM\libLLVM.runtime.ubuntu.22.04-x64\libLLVM.runtime.ubuntu.22.04-x64.nuspec = packages\libLLVM\libLLVM.runtime.ubuntu.22.04-x64\libLLVM.runtime.ubuntu.22.04-x64.nuspec
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libLLVM.runtime.win-arm64", "libLLVM.runtime.win-arm64", "{19DB05E9-59B6-45E9-B47D-62913F7DF9A8}"
|
||||
|
@ -123,6 +123,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libLLVM.runtime.freebsd.13-
|
|||
packages\libLLVM\libLLVM.runtime.freebsd.13-x64\libLLVM.runtime.freebsd.13-x64.nuspec = packages\libLLVM\libLLVM.runtime.freebsd.13-x64\libLLVM.runtime.freebsd.13-x64.nuspec
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libLLVM.runtime.linux-x64", "libLLVM.runtime.linux-x64", "{C8508256-2EC1-4C88-B61D-AFB86569FBCD}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
packages\libLLVM\libLLVM.runtime.linux-x64\libLLVM.runtime.linux-x64.nuspec = packages\libLLVM\libLLVM.runtime.linux-x64\libLLVM.runtime.linux-x64.nuspec
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libLLVM.runtime.osx-arm64", "libLLVM.runtime.osx-arm64", "{3870145D-F6DC-4082-A3F5-2316D49ADD43}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
packages\libLLVM\libLLVM.runtime.osx-arm64\libLLVM.runtime.osx-arm64.nuspec = packages\libLLVM\libLLVM.runtime.osx-arm64\libLLVM.runtime.osx-arm64.nuspec
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -162,6 +172,8 @@ Global
|
|||
{CEA0F0C9-DF25-446B-8F55-FB629BD1D3E6} = {62B5C536-C224-4EE1-972F-05F732B5980B}
|
||||
{706334B8-BB91-49A4-BC9C-DFFDF3DCD770} = {E8ADE5A7-4363-43B7-B104-6B0E5510CAF0}
|
||||
{4F526018-55AE-41FF-BF01-21F60EB95CBC} = {9D46FF1C-E09F-4063-A97D-C09F26310B67}
|
||||
{C8508256-2EC1-4C88-B61D-AFB86569FBCD} = {9D46FF1C-E09F-4063-A97D-C09F26310B67}
|
||||
{3870145D-F6DC-4082-A3F5-2316D49ADD43} = {9D46FF1C-E09F-4063-A97D-C09F26310B67}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {75550D8C-A492-4ED3-8387-206830F8B21E}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM.runtime.freebsd.12-x64</id>
|
||||
<version>14.0.0</version>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>freebsd 12 x64 native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-14.0.0" />
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM.runtime.freebsd.13-x64</id>
|
||||
<version>14.0.0</version>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>freebsd 13 x64 native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-14.0.0" />
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM.runtime.linux-arm64</id>
|
||||
<version>14.0.0</version>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>linux arm64 native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-14.0.0" />
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM.runtime.linux-x64</id>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<license type="expression">Apache-2.0 WITH LLVM-exception</license>
|
||||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>linux x64 native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
|
||||
<file src="libLLVM.so" target="runtimes\linux-x64\native\libLLVM.so" />
|
||||
</files>
|
||||
</package>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM.runtime.osx-arm64</id>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<license type="expression">Apache-2.0 WITH LLVM-exception</license>
|
||||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>osx arm64 native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
|
||||
<file src="libLLVM.dylib" target="runtimes\osx-arm64\native\libLLVM.dylib" />
|
||||
</files>
|
||||
</package>
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM.runtime.osx-x64</id>
|
||||
<version>14.0.0</version>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>osx x64 native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-14.0.0" />
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM.runtime.ubuntu.18.04-x64</id>
|
||||
<version>14.0.0</version>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>ubuntu 18.04 x64 native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-14.0.0" />
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM.runtime.ubuntu.20.04-x64</id>
|
||||
<version>14.0.0</version>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>ubuntu 20.04 x64 native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-14.0.0" />
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM.runtime.ubuntu.21.10-x64</id>
|
||||
<version>14.0.0</version>
|
||||
<id>libLLVM.runtime.ubuntu.22.04-x64</id>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<license type="expression">Apache-2.0 WITH LLVM-exception</license>
|
||||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>ubuntu 21.10 x64 native library for libLLVM.</description>
|
||||
<description>ubuntu 22.04 x64 native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-14.0.0" />
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
|
||||
<file src="libLLVM.so" target="runtimes\ubuntu.21.10-x64\native\libLLVM.so" />
|
||||
<file src="libLLVM.so" target="runtimes\ubuntu.22.04-x64\native\libLLVM.so" />
|
||||
</files>
|
||||
</package>
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM.runtime.win-arm64</id>
|
||||
<version>14.0.0</version>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>win arm64 native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-14.0.0" />
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM.runtime.win-x64</id>
|
||||
<version>14.0.0</version>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>win x64 native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-14.0.0" />
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM.runtime.win-x86</id>
|
||||
<version>14.0.0</version>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>win x86 native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-14.0.0" />
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
|
||||
|
|
|
@ -239,7 +239,7 @@ Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
|
|||
University of Illinois/NCSA
|
||||
Open Source License
|
||||
|
||||
Copyright (c) 2007-2019 University of Illinois at Urbana-Champaign.
|
||||
Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign.
|
||||
All rights reserved.
|
||||
|
||||
Developed by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.12">
|
||||
<id>libLLVM</id>
|
||||
<version>14.0.0</version>
|
||||
<version>15.0.0</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<owners>.NET Foundation and Contributors</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
|
@ -10,14 +10,12 @@
|
|||
<projectUrl>https://github.com/dotnet/llvmsharp</projectUrl>
|
||||
<description>Multi-platform native library for libLLVM.</description>
|
||||
<copyright>Copyright © LLVM Project</copyright>
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-14.0.0" />
|
||||
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-15.0.0" />
|
||||
<dependencies>
|
||||
<group targetFramework=".NETStandard1.0">
|
||||
<dependency id="Microsoft.NETCore.Platforms" version="1.0.1" />
|
||||
</group>
|
||||
<group targetFramework=".NETStandard2.0" />
|
||||
</dependencies>
|
||||
</metadata><files>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="LICENSE.TXT" target="LICENSE.TXT" />
|
||||
<file src="runtime.json" target="runtime.json" />
|
||||
</files>
|
||||
|
|
|
@ -2,52 +2,62 @@
|
|||
"runtimes": {
|
||||
"freebsd.12-x64": {
|
||||
"libLLVM": {
|
||||
"libLLVM.runtime.freebsd.12-x64": "14.0.0"
|
||||
"libLLVM.runtime.freebsd.12-x64": "15.0.0"
|
||||
}
|
||||
},
|
||||
"freebsd.13-x64": {
|
||||
"libLLVM": {
|
||||
"libLLVM.runtime.freebsd.13-x64": "14.0.0"
|
||||
"libLLVM.runtime.freebsd.13-x64": "15.0.0"
|
||||
}
|
||||
},
|
||||
"linux-arm64": {
|
||||
"libLLVM": {
|
||||
"libLLVM.runtime.linux-arm64": "14.0.0"
|
||||
"libLLVM.runtime.linux-arm64": "15.0.0"
|
||||
}
|
||||
},
|
||||
"linux-x64": {
|
||||
"libLLVM": {
|
||||
"libLLVM.runtime.linux-x64": "15.0.0"
|
||||
}
|
||||
},
|
||||
"osx-arm64": {
|
||||
"libLLVM": {
|
||||
"libLLVM.runtime.osx-arm64": "15.0.0"
|
||||
}
|
||||
},
|
||||
"osx-x64": {
|
||||
"libLLVM": {
|
||||
"libLLVM.runtime.osx-x64": "14.0.0"
|
||||
"libLLVM.runtime.osx-x64": "15.0.0"
|
||||
}
|
||||
},
|
||||
"ubuntu.18.04-x64": {
|
||||
"libLLVM": {
|
||||
"libLLVM.runtime.ubuntu.18.04-x64": "14.0.0"
|
||||
"libLLVM.runtime.ubuntu.18.04-x64": "15.0.0"
|
||||
}
|
||||
},
|
||||
"ubuntu.20.04-x64": {
|
||||
"libLLVM": {
|
||||
"libLLVM.runtime.ubuntu.20.04-x64": "14.0.0"
|
||||
"libLLVM.runtime.ubuntu.20.04-x64": "15.0.0"
|
||||
}
|
||||
},
|
||||
"ubuntu.21.10-x64": {
|
||||
"ubuntu.22.04-x64": {
|
||||
"libLLVM": {
|
||||
"libLLVM.runtime.ubuntu.21.10-x64": "14.0.0"
|
||||
"libLLVM.runtime.ubuntu.22.04-x64": "15.0.0"
|
||||
}
|
||||
},
|
||||
"win-arm64": {
|
||||
"libLLVM": {
|
||||
"libLLVM.runtime.win-arm64": "14.0.0"
|
||||
"libLLVM.runtime.win-arm64": "15.0.0"
|
||||
}
|
||||
},
|
||||
"win-x64": {
|
||||
"libLLVM": {
|
||||
"libLLVM.runtime.win-x64": "14.0.0"
|
||||
"libLLVM.runtime.win-x64": "15.0.0"
|
||||
}
|
||||
},
|
||||
"win-x86": {
|
||||
"libLLVM": {
|
||||
"libLLVM.runtime.win-x86": "14.0.0"
|
||||
"libLLVM.runtime.win-x86": "15.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace LLVMSharp.Interop;
|
|||
|
||||
public static unsafe partial class LLVM
|
||||
{
|
||||
public static event DllImportResolver ResolveLibrary;
|
||||
public static event DllImportResolver? ResolveLibrary;
|
||||
|
||||
static LLVM()
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMAttributeRef : IEquatable<LLVMAttributeRef>
|
|||
|
||||
public static bool operator !=(LLVMAttributeRef left, LLVMAttributeRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMAttributeRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMAttributeRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMAttributeRef other) => this == other;
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ public unsafe partial struct LLVMBasicBlockRef : IEquatable<LLVMBasicBlockRef>
|
|||
|
||||
public void Dump() => LLVM.DumpValue(this);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMBasicBlockRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMBasicBlockRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMBasicBlockRef other) => this == other;
|
||||
|
||||
|
@ -93,9 +93,8 @@ public unsafe partial struct LLVMBasicBlockRef : IEquatable<LLVMBasicBlockRef>
|
|||
{
|
||||
return string.Empty;
|
||||
}
|
||||
var span = new ReadOnlySpan<byte>(pStr, int.MaxValue);
|
||||
|
||||
var result = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
var result = SpanExtensions.AsString(pStr);
|
||||
LLVM.DisposeMessage(pStr);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMBinaryRef : IEquatable<LLVMBinaryRef>
|
|||
|
||||
public static bool operator !=(LLVMBinaryRef left, LLVMBinaryRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMBinaryRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMBinaryRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMBinaryRef other) => this == other;
|
||||
|
||||
|
|
|
@ -124,8 +124,10 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
|
||||
public LLVMValueRef BuildBr(LLVMBasicBlockRef Dest) => LLVM.BuildBr(this, Dest);
|
||||
|
||||
[Obsolete("Use BuildCall2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildCall(LLVMValueRef Fn, LLVMValueRef[] Args, string Name = "") => BuildCall(Fn, Args.AsSpan(), Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildCall2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildCall(LLVMValueRef Fn, ReadOnlySpan<LLVMValueRef> Args, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pArgs = Args)
|
||||
|
@ -135,6 +137,17 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildCall2(LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef[] Args, string Name = "") => BuildCall2(Ty, Fn, Args.AsSpan(), Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildCall2(LLVMTypeRef Ty, LLVMValueRef Fn, ReadOnlySpan<LLVMValueRef> Args, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pArgs = Args)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildCall2(this, Ty, Fn, (LLVMOpaqueValue**)pArgs, (uint)Args.Length, marshaledName);
|
||||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildCast(LLVMOpcode Op, LLVMValueRef Val, LLVMTypeRef DestTy, string Name = "") => BuildCast(Op, Val, DestTy, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildCast(LLVMOpcode Op, LLVMValueRef Val, LLVMTypeRef DestTy, ReadOnlySpan<char> Name)
|
||||
|
@ -283,8 +296,10 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
return LLVM.BuildFSub(this, LHS, RHS, marshaledName);
|
||||
}
|
||||
|
||||
[Obsolete("Use BuildGEP2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildGEP(LLVMValueRef Pointer, LLVMValueRef[] Indices, string Name = "") => BuildGEP(Pointer, Indices.AsSpan(), Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildGEP2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildGEP(LLVMValueRef Pointer, ReadOnlySpan<LLVMValueRef> Indices, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pIndices = Indices)
|
||||
|
@ -294,6 +309,17 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildGEP2(LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef[] Indices, string Name = "") => BuildGEP2(Ty, Pointer, Indices.AsSpan(), Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildGEP2(LLVMTypeRef Ty, LLVMValueRef Pointer, ReadOnlySpan<LLVMValueRef> Indices, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pIndices = Indices)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildGEP2(this, Ty, Pointer, (LLVMOpaqueValue**)pIndices, (uint)Indices.Length, marshaledName);
|
||||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildGlobalString(string Str, string Name = "") => BuildGlobalString(Str.AsSpan(), Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildGlobalString(ReadOnlySpan<char> Str, ReadOnlySpan<char> Name)
|
||||
|
@ -320,8 +346,10 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
return LLVM.BuildICmp(this, Op, LHS, RHS, marshaledName);
|
||||
}
|
||||
|
||||
[Obsolete("Use BuildInBoundsGEP2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildInBoundsGEP(LLVMValueRef Pointer, LLVMValueRef[] Indices, string Name = "") => BuildInBoundsGEP(Pointer, Indices.AsSpan(), Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildInBoundsGEP2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildInBoundsGEP(LLVMValueRef Pointer, ReadOnlySpan<LLVMValueRef> Indices, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pIndices = Indices)
|
||||
|
@ -331,6 +359,17 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef[] Indices, string Name = "") => BuildInBoundsGEP2(Ty, Pointer, Indices.AsSpan(), Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef Pointer, ReadOnlySpan<LLVMValueRef> Indices, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pIndices = Indices)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildInBoundsGEP2(this, Ty, Pointer, (LLVMOpaqueValue**)pIndices, (uint)Indices.Length, marshaledName);
|
||||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildIndirectBr(LLVMValueRef Addr, uint NumDests) => LLVM.BuildIndirectBr(this, Addr, NumDests);
|
||||
|
||||
public LLVMValueRef BuildInsertElement(LLVMValueRef VecVal, LLVMValueRef EltVal, LLVMValueRef Index, string Name = "") => BuildInsertElement(VecVal, EltVal, Index, Name.AsSpan());
|
||||
|
@ -365,8 +404,10 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
return LLVM.BuildIntToPtr(this, Val, DestTy, marshaledName);
|
||||
}
|
||||
|
||||
[Obsolete("Use BuildInvoke2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildInvoke(LLVMValueRef Fn, LLVMValueRef[] Args, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, string Name = "") => BuildInvoke(Fn, Args.AsSpan(), Then, Catch, Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildInvoke2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildInvoke(LLVMValueRef Fn, ReadOnlySpan<LLVMValueRef> Args, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pArgs = Args)
|
||||
|
@ -376,6 +417,17 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildInvoke2(LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef[] Args, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, string Name = "") => BuildInvoke2(Ty, Fn, Args.AsSpan(), Then, Catch, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildInvoke2(LLVMTypeRef Ty, LLVMValueRef Fn, ReadOnlySpan<LLVMValueRef> Args, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pArgs = Args)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildInvoke2(this, Ty, Fn, (LLVMOpaqueValue**)pArgs, (uint)Args.Length, Then, Catch, marshaledName);
|
||||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildIsNotNull(LLVMValueRef Val, string Name = "") => BuildIsNotNull(Val, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildIsNotNull(LLVMValueRef Val, ReadOnlySpan<char> Name)
|
||||
|
@ -400,14 +452,24 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
return LLVM.BuildLandingPad(this, Ty, PersFn, NumClauses, marshaledName);
|
||||
}
|
||||
|
||||
[Obsolete("Use BuildLoad2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildLoad(LLVMValueRef PointerVal, string Name = "") => BuildLoad(PointerVal, Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildLoad2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildLoad(LLVMValueRef PointerVal, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildLoad(this, PointerVal, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildLoad2(LLVMTypeRef Ty, LLVMValueRef PointerVal, string Name = "") => BuildLoad2(Ty, PointerVal, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildLoad2(LLVMTypeRef Ty, LLVMValueRef PointerVal, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildLoad2(this, Ty, PointerVal, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildLShr(LLVMValueRef LHS, LLVMValueRef RHS, string Name = "") => BuildLShr(LHS, RHS, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildLShr(LLVMValueRef LHS, LLVMValueRef RHS, ReadOnlySpan<char> Name)
|
||||
|
@ -536,14 +598,24 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
return LLVM.BuildPointerCast(this, Val, DestTy, marshaledName);
|
||||
}
|
||||
|
||||
[Obsolete("Use BuildPtrDiff2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildPtrDiff(LLVMValueRef LHS, LLVMValueRef RHS, string Name = "") => BuildPtrDiff(LHS, RHS, Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildPtrDiff2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildPtrDiff(LLVMValueRef LHS, LLVMValueRef RHS, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildPtrDiff(this, LHS, RHS, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildPtrDiff2(LLVMTypeRef ElemTy, LLVMValueRef LHS, LLVMValueRef RHS, string Name = "") => BuildPtrDiff2(ElemTy, LHS, RHS, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildPtrDiff2(LLVMTypeRef ElemTy, LLVMValueRef LHS, LLVMValueRef RHS, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildPtrDiff2(this, ElemTy, LHS, RHS, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildPtrToInt(LLVMValueRef Val, LLVMTypeRef DestTy, string Name = "") => BuildPtrToInt(Val, DestTy, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildPtrToInt(LLVMValueRef Val, LLVMTypeRef DestTy, ReadOnlySpan<char> Name)
|
||||
|
@ -624,14 +696,24 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
|
||||
public LLVMValueRef BuildStore(LLVMValueRef Val, LLVMValueRef Ptr) => LLVM.BuildStore(this, Val, Ptr);
|
||||
|
||||
[Obsolete("Use BuildStructGEP2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildStructGEP(LLVMValueRef Pointer, uint Idx, string Name = "") => BuildStructGEP(Pointer, Idx, Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildStructGEP2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildStructGEP(LLVMValueRef Pointer, uint Idx, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildStructGEP(this, Pointer, Idx, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildStructGEP2(LLVMTypeRef Ty, LLVMValueRef Pointer, uint Idx, string Name = "") => BuildStructGEP2(Ty, Pointer, Idx, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildStructGEP2(LLVMTypeRef Ty, LLVMValueRef Pointer, uint Idx, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildStructGEP2(this, Ty, Pointer, Idx, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildSub(LLVMValueRef LHS, LLVMValueRef RHS, string Name = "") => BuildSub(LHS, RHS, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildSub(LLVMValueRef LHS, LLVMValueRef RHS, ReadOnlySpan<char> Name)
|
||||
|
@ -726,7 +808,7 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
}
|
||||
}
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMBuilderRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMBuilderRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMBuilderRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMComdatRef : IEquatable<LLVMComdatRef>
|
|||
|
||||
public static bool operator !=(LLVMComdatRef left, LLVMComdatRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMComdatRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMComdatRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMComdatRef other) => this == other;
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ public unsafe partial struct LLVMContextRef : IDisposable, IEquatable<LLVMContex
|
|||
}
|
||||
}
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMContextRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMContextRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMContextRef other) => this == other;
|
||||
|
||||
|
@ -195,16 +195,26 @@ public unsafe partial struct LLVMContextRef : IDisposable, IEquatable<LLVMContex
|
|||
return M;
|
||||
}
|
||||
|
||||
public void SetDiagnosticHandler(LLVMDiagnosticHandler Handler, IntPtr DiagnosticContext)
|
||||
public void SetDiagnosticHandler(LLVMDiagnosticHandler Handler, void* DiagnosticContext)
|
||||
{
|
||||
var pHandler = Marshal.GetFunctionPointerForDelegate(Handler);
|
||||
LLVM.ContextSetDiagnosticHandler(this, pHandler, (void*)DiagnosticContext);
|
||||
var pHandler = (delegate* unmanaged[Cdecl] < LLVMOpaqueDiagnosticInfo *, void *, void > )Marshal.GetFunctionPointerForDelegate(Handler);
|
||||
SetDiagnosticHandler(pHandler, DiagnosticContext);
|
||||
}
|
||||
|
||||
public void SetYieldCallback(LLVMYieldCallback Callback, IntPtr OpaqueHandle)
|
||||
public void SetDiagnosticHandler(delegate* unmanaged[Cdecl]<LLVMOpaqueDiagnosticInfo*, void*, void> Handler, void* DiagnosticContext)
|
||||
{
|
||||
var pCallback = Marshal.GetFunctionPointerForDelegate(Callback);
|
||||
LLVM.ContextSetYieldCallback(this, pCallback, (void*)OpaqueHandle);
|
||||
LLVM.ContextSetDiagnosticHandler(this, Handler, DiagnosticContext);
|
||||
}
|
||||
|
||||
public void SetYieldCallback(LLVMYieldCallback Callback, void* OpaqueHandle)
|
||||
{
|
||||
var pCallback = (delegate* unmanaged[Cdecl] < LLVMOpaqueContext *, void *, void>)Marshal.GetFunctionPointerForDelegate(Callback);
|
||||
SetYieldCallback(pCallback, OpaqueHandle);
|
||||
}
|
||||
|
||||
public void SetYieldCallback(delegate* unmanaged[Cdecl]<LLVMOpaqueContext*, void*, void> Callback, void* OpaqueHandle)
|
||||
{
|
||||
LLVM.ContextSetYieldCallback(this, Callback, OpaqueHandle);
|
||||
}
|
||||
|
||||
public override string ToString() => $"{nameof(LLVMContextRef)}: {Handle:X}";
|
||||
|
@ -222,8 +232,7 @@ public unsafe partial struct LLVMContextRef : IDisposable, IEquatable<LLVMContex
|
|||
}
|
||||
else
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(pMessage, int.MaxValue);
|
||||
OutMessage = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
OutMessage = SpanExtensions.AsString(pMessage);
|
||||
}
|
||||
|
||||
return result == 0;
|
||||
|
@ -243,8 +252,7 @@ public unsafe partial struct LLVMContextRef : IDisposable, IEquatable<LLVMContex
|
|||
}
|
||||
else
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(pMessage, int.MaxValue);
|
||||
OutMessage = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
OutMessage = SpanExtensions.AsString(pMessage);
|
||||
}
|
||||
|
||||
return result == 0;
|
||||
|
@ -264,8 +272,7 @@ public unsafe partial struct LLVMContextRef : IDisposable, IEquatable<LLVMContex
|
|||
}
|
||||
else
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(pMessage, int.MaxValue);
|
||||
OutMessage = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
OutMessage = SpanExtensions.AsString(pMessage);
|
||||
}
|
||||
|
||||
return result == 0;
|
||||
|
|
|
@ -113,7 +113,7 @@ public unsafe partial struct LLVMDIBuilderRef : IEquatable<LLVMDIBuilderRef>
|
|||
|
||||
public void DIBuilderFinalize() => LLVM.DIBuilderFinalize(this);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMDIBuilderRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMDIBuilderRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMDIBuilderRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMDiagnosticInfoRef : IEquatable<LLVMDiagnosticIn
|
|||
|
||||
public static bool operator !=(LLVMDiagnosticInfoRef left, LLVMDiagnosticInfoRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMDiagnosticInfoRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMDiagnosticInfoRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMDiagnosticInfoRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMDisasmContextRef : IEquatable<LLVMDisasmContext
|
|||
|
||||
public static bool operator !=(LLVMDisasmContextRef left, LLVMDisasmContextRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMDisasmContextRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMDisasmContextRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMDisasmContextRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMErrorRef : IEquatable<LLVMErrorRef>
|
|||
|
||||
public static bool operator !=(LLVMErrorRef left, LLVMErrorRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMErrorRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMErrorRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMErrorRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMErrorTypeId : IEquatable<LLVMErrorTypeId>
|
|||
|
||||
public static bool operator !=(LLVMErrorTypeId left, LLVMErrorTypeId right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMErrorTypeId other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMErrorTypeId other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMErrorTypeId other) => this == other;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public unsafe partial struct LLVMExecutionEngineRef : IDisposable, IEquatable<LL
|
|||
}
|
||||
}
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMExecutionEngineRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMExecutionEngineRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMExecutionEngineRef other) => this == other;
|
||||
|
||||
|
@ -151,8 +151,7 @@ public unsafe partial struct LLVMExecutionEngineRef : IDisposable, IEquatable<LL
|
|||
}
|
||||
else
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(pError, int.MaxValue);
|
||||
OutError = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
OutError = SpanExtensions.AsString(pError);
|
||||
}
|
||||
|
||||
return result == 0;
|
||||
|
|
|
@ -25,7 +25,7 @@ public unsafe partial struct LLVMGenericValueRef : IEquatable<LLVMGenericValueRe
|
|||
|
||||
public LLVMGenericValueRef CreateFloat(LLVMTypeRef Ty, double N) => LLVM.CreateGenericValueOfFloat(Ty, N);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMGenericValueRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMGenericValueRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMGenericValueRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMJITEventListenerRef : IEquatable<LLVMJITEventLi
|
|||
|
||||
public static bool operator !=(LLVMJITEventListenerRef left, LLVMJITEventListenerRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMJITEventListenerRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMJITEventListenerRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMJITEventListenerRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMMCJITMemoryManagerRef : IEquatable<LLVMMCJITMem
|
|||
|
||||
public static bool operator !=(LLVMMCJITMemoryManagerRef left, LLVMMCJITMemoryManagerRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMMCJITMemoryManagerRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMMCJITMemoryManagerRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMMCJITMemoryManagerRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMMemoryBufferRef : IEquatable<LLVMMemoryBufferRe
|
|||
|
||||
public static bool operator !=(LLVMMemoryBufferRef left, LLVMMemoryBufferRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMMemoryBufferRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMMemoryBufferRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMMemoryBufferRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMMetadataRef : IEquatable<LLVMMetadataRef>
|
|||
|
||||
public static bool operator !=(LLVMMetadataRef left, LLVMMetadataRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMMetadataRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMMetadataRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMMetadataRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMModuleFlagEntry : IEquatable<LLVMModuleFlagEntr
|
|||
|
||||
public static bool operator !=(LLVMModuleFlagEntry left, LLVMModuleFlagEntry right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMModuleFlagEntry other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMModuleFlagEntry other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMModuleFlagEntry other) => this == other;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public unsafe partial struct LLVMModuleProviderRef : IEquatable<LLVMModuleProvid
|
|||
|
||||
public LLVMPassManagerRef CreateFunctionPassManager() => LLVM.CreateFunctionPassManager(this);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMModuleProviderRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMModuleProviderRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMModuleProviderRef other) => this == other;
|
||||
|
||||
|
|
|
@ -32,8 +32,7 @@ public unsafe partial struct LLVMModuleRef : IDisposable, IEquatable<LLVMModuleR
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
var span = new ReadOnlySpan<byte>(pDataLayoutStr, int.MaxValue);
|
||||
return span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
return SpanExtensions.AsString(pDataLayoutStr);
|
||||
}
|
||||
|
||||
set
|
||||
|
@ -67,8 +66,7 @@ public unsafe partial struct LLVMModuleRef : IDisposable, IEquatable<LLVMModuleR
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
var span = new ReadOnlySpan<byte>(pTriple, int.MaxValue);
|
||||
return span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
return SpanExtensions.AsString(pTriple);
|
||||
}
|
||||
|
||||
set
|
||||
|
@ -94,14 +92,24 @@ public unsafe partial struct LLVMModuleRef : IDisposable, IEquatable<LLVMModuleR
|
|||
return LLVM.ModuleCreateWithName(marshaledModuleID);
|
||||
}
|
||||
|
||||
[Obsolete("Use AddAlias2 instead to support opaque pointer")]
|
||||
public LLVMValueRef AddAlias(LLVMTypeRef Ty, LLVMValueRef Aliasee, string Name) => AddAlias(Ty, Aliasee, Name.AsSpan());
|
||||
|
||||
[Obsolete("Use AddAlias2 instead to support opaque pointer")]
|
||||
public LLVMValueRef AddAlias(LLVMTypeRef Ty, LLVMValueRef Aliasee, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.AddAlias(this, Ty, Aliasee, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef AddAlias2(LLVMTypeRef ValueTy, uint AddrSpace, LLVMValueRef Aliasee, string Name) => AddAlias2(ValueTy, AddrSpace, Aliasee, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef AddAlias2(LLVMTypeRef ValueTy, uint AddrSpace, LLVMValueRef Aliasee, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.AddAlias2(this, ValueTy, AddrSpace, Aliasee, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef AddFunction(string Name, LLVMTypeRef FunctionTy) => AddFunction(Name.AsSpan(), FunctionTy);
|
||||
|
||||
public LLVMValueRef AddFunction(ReadOnlySpan<char> Name, LLVMTypeRef FunctionTy)
|
||||
|
@ -225,7 +233,7 @@ public unsafe partial struct LLVMModuleRef : IDisposable, IEquatable<LLVMModuleR
|
|||
|
||||
public void Dump() => LLVM.DumpModule(this);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMModuleRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMModuleRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMModuleRef other) => this == other;
|
||||
|
||||
|
@ -296,9 +304,8 @@ public unsafe partial struct LLVMModuleRef : IDisposable, IEquatable<LLVMModuleR
|
|||
{
|
||||
return string.Empty;
|
||||
}
|
||||
var span = new ReadOnlySpan<byte>(pStr, int.MaxValue);
|
||||
|
||||
var result = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
var result = SpanExtensions.AsString(pStr);
|
||||
LLVM.DisposeMessage(pStr);
|
||||
return result;
|
||||
}
|
||||
|
@ -326,8 +333,7 @@ public unsafe partial struct LLVMModuleRef : IDisposable, IEquatable<LLVMModuleR
|
|||
}
|
||||
else
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(pError, int.MaxValue);
|
||||
OutError = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
OutError = SpanExtensions.AsString(pError);
|
||||
}
|
||||
|
||||
return result == 0;
|
||||
|
@ -347,8 +353,7 @@ public unsafe partial struct LLVMModuleRef : IDisposable, IEquatable<LLVMModuleR
|
|||
}
|
||||
else
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(pError, int.MaxValue);
|
||||
OutError = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
OutError = SpanExtensions.AsString(pError);
|
||||
}
|
||||
|
||||
return result == 0;
|
||||
|
@ -375,8 +380,7 @@ public unsafe partial struct LLVMModuleRef : IDisposable, IEquatable<LLVMModuleR
|
|||
}
|
||||
else
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(pError, int.MaxValue);
|
||||
OutError = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
OutError = SpanExtensions.AsString(pError);
|
||||
}
|
||||
|
||||
return result == 0;
|
||||
|
@ -391,6 +395,7 @@ public unsafe partial struct LLVMModuleRef : IDisposable, IEquatable<LLVMModuleR
|
|||
|
||||
sbyte* pErrorMessage = null;
|
||||
int result = 0;
|
||||
|
||||
try
|
||||
{
|
||||
result = LLVM.PrintModuleToFile(this, marshaledFilename, &pErrorMessage);
|
||||
|
@ -405,8 +410,7 @@ public unsafe partial struct LLVMModuleRef : IDisposable, IEquatable<LLVMModuleR
|
|||
}
|
||||
else
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(pErrorMessage, int.MaxValue);
|
||||
ErrorMessage = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
ErrorMessage = SpanExtensions.AsString(pErrorMessage);
|
||||
}
|
||||
|
||||
return result == 0;
|
||||
|
@ -423,8 +427,7 @@ public unsafe partial struct LLVMModuleRef : IDisposable, IEquatable<LLVMModuleR
|
|||
}
|
||||
else
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(pMessage, int.MaxValue);
|
||||
OutMessage = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
OutMessage = SpanExtensions.AsString(pMessage);
|
||||
}
|
||||
|
||||
return result == 0;
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMNamedMDNodeRef : IEquatable<LLVMNamedMDNodeRef>
|
|||
|
||||
public static bool operator !=(LLVMNamedMDNodeRef left, LLVMNamedMDNodeRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMNamedMDNodeRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMNamedMDNodeRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMNamedMDNodeRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMObjectFileRef : IEquatable<LLVMObjectFileRef>
|
|||
|
||||
public static bool operator !=(LLVMObjectFileRef left, LLVMObjectFileRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMObjectFileRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMObjectFileRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMObjectFileRef other) => this == other;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public unsafe partial struct LLVMPassManagerBuilderRef : IEquatable<LLVMPassMana
|
|||
}
|
||||
}
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMPassManagerBuilderRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMPassManagerBuilderRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMPassManagerBuilderRef other) => this == other;
|
||||
|
||||
|
@ -40,11 +40,6 @@ public unsafe partial struct LLVMPassManagerBuilderRef : IEquatable<LLVMPassMana
|
|||
|
||||
public void PopulateModulePassManager(LLVMPassManagerRef PM) => LLVM.PassManagerBuilderPopulateModulePassManager(this, PM);
|
||||
|
||||
public void PopulateLTOPassManager(LLVMPassManagerRef PM, int Internalize, int RunInliner)
|
||||
{
|
||||
LLVM.PassManagerBuilderPopulateLTOPassManager(this, PM, Internalize, RunInliner);
|
||||
}
|
||||
|
||||
public void SetSizeLevel(uint SizeLevel) => LLVM.PassManagerBuilderSetSizeLevel(this, SizeLevel);
|
||||
|
||||
public void SetDisableUnitAtATime(int Value) => LLVM.PassManagerBuilderSetDisableUnitAtATime(this, Value);
|
||||
|
|
|
@ -29,8 +29,6 @@ public unsafe partial struct LLVMPassManagerRef : IDisposable, IEquatable<LLVMPa
|
|||
|
||||
public void AddAlwaysInlinerPass() => LLVM.AddAlwaysInlinerPass(this);
|
||||
|
||||
public void AddArgumentPromotionPass() => LLVM.AddArgumentPromotionPass(this);
|
||||
|
||||
public void AddBasicAliasAnalysisPass() => LLVM.AddBasicAliasAnalysisPass(this);
|
||||
|
||||
public void AddBitTrackingDCEPass() => LLVM.AddBitTrackingDCEPass(this);
|
||||
|
@ -87,8 +85,6 @@ public unsafe partial struct LLVMPassManagerRef : IDisposable, IEquatable<LLVMPa
|
|||
|
||||
public void AddLoopUnrollPass() => LLVM.AddLoopUnrollPass(this);
|
||||
|
||||
public void AddLoopUnswitchPass() => LLVM.AddLoopUnswitchPass(this);
|
||||
|
||||
public void AddLoopVectorizePass() => LLVM.AddLoopVectorizePass(this);
|
||||
|
||||
public void AddLowerConstantIntrinsicsPass() => LLVM.AddLowerConstantIntrinsicsPass(this);
|
||||
|
@ -148,7 +144,7 @@ public unsafe partial struct LLVMPassManagerRef : IDisposable, IEquatable<LLVMPa
|
|||
}
|
||||
}
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMPassManagerRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMPassManagerRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMPassManagerRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMPassRegistryRef : IEquatable<LLVMPassRegistryRe
|
|||
|
||||
public static bool operator !=(LLVMPassRegistryRef left, LLVMPassRegistryRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMPassRegistryRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMPassRegistryRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMPassRegistryRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMRelocationIteratorRef : IEquatable<LLVMRelocati
|
|||
|
||||
public static bool operator !=(LLVMRelocationIteratorRef left, LLVMRelocationIteratorRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMRelocationIteratorRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMRelocationIteratorRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMRelocationIteratorRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMRemarkArgRef : IEquatable<LLVMRemarkArgRef>
|
|||
|
||||
public static bool operator !=(LLVMRemarkArgRef left, LLVMRemarkArgRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMRemarkArgRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMRemarkArgRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMRemarkArgRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMRemarkDebugLocRef : IEquatable<LLVMRemarkDebugL
|
|||
|
||||
public static bool operator !=(LLVMRemarkDebugLocRef left, LLVMRemarkDebugLocRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMRemarkDebugLocRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMRemarkDebugLocRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMRemarkDebugLocRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMRemarkEntryRef : IEquatable<LLVMRemarkEntryRef>
|
|||
|
||||
public static bool operator !=(LLVMRemarkEntryRef left, LLVMRemarkEntryRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMRemarkEntryRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMRemarkEntryRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMRemarkEntryRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMRemarkParserRef : IEquatable<LLVMRemarkParserRe
|
|||
|
||||
public static bool operator !=(LLVMRemarkParserRef left, LLVMRemarkParserRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMRemarkParserRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMRemarkParserRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMRemarkParserRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMRemarkStringRef : IEquatable<LLVMRemarkStringRe
|
|||
|
||||
public static bool operator !=(LLVMRemarkStringRef left, LLVMRemarkStringRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMRemarkStringRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMRemarkStringRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMRemarkStringRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMSectionIteratorRef : IEquatable<LLVMSectionIter
|
|||
|
||||
public static bool operator !=(LLVMSectionIteratorRef left, LLVMSectionIteratorRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMSectionIteratorRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMSectionIteratorRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMSectionIteratorRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMSymbolIteratorRef : IEquatable<LLVMSymbolIterat
|
|||
|
||||
public static bool operator !=(LLVMSymbolIteratorRef left, LLVMSymbolIteratorRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMSymbolIteratorRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMSymbolIteratorRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMSymbolIteratorRef other) => this == other;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public unsafe partial struct LLVMTargetDataRef : IEquatable<LLVMTargetDataRef>
|
|||
|
||||
public static LLVMTargetDataRef FromStringRepresentation(ReadOnlySpan<char> stringRep) => LLVM.CreateTargetData(new MarshaledString(stringRep));
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMTargetDataRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMTargetDataRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMTargetDataRef other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMTargetLibraryInfoRef : IEquatable<LLVMTargetLib
|
|||
|
||||
public static bool operator !=(LLVMTargetLibraryInfoRef left, LLVMTargetLibraryInfoRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMTargetLibraryInfoRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMTargetLibraryInfoRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMTargetLibraryInfoRef other) => this == other;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public unsafe partial struct LLVMTargetMachineRef : IEquatable<LLVMTargetMachine
|
|||
}
|
||||
}
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMTargetMachineRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMTargetMachineRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMTargetMachineRef other) => this == other;
|
||||
|
||||
|
@ -57,8 +57,7 @@ public unsafe partial struct LLVMTargetMachineRef : IEquatable<LLVMTargetMachine
|
|||
}
|
||||
else
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(errorMessage, int.MaxValue);
|
||||
message = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
message = SpanExtensions.AsString(errorMessage);
|
||||
LLVM.DisposeErrorMessage(errorMessage);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,7 @@ public unsafe partial struct LLVMTargetRef : IEquatable<LLVMTargetRef>
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
var span = new ReadOnlySpan<byte>(pDefaultTriple, int.MaxValue);
|
||||
return span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
return SpanExtensions.AsString(pDefaultTriple);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,8 +45,7 @@ public unsafe partial struct LLVMTargetRef : IEquatable<LLVMTargetRef>
|
|||
}
|
||||
else
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(pError, int.MaxValue);
|
||||
outError = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
outError = SpanExtensions.AsString(pError);
|
||||
}
|
||||
|
||||
return result == 0;
|
||||
|
@ -98,8 +96,7 @@ public unsafe partial struct LLVMTargetRef : IEquatable<LLVMTargetRef>
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
var span = new ReadOnlySpan<byte>(pName, int.MaxValue);
|
||||
return span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
return SpanExtensions.AsString(pName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,7 +108,7 @@ public unsafe partial struct LLVMTargetRef : IEquatable<LLVMTargetRef>
|
|||
|
||||
public static bool operator !=(LLVMTargetRef left, LLVMTargetRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMTargetRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMTargetRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMTargetRef other) => this == other;
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public unsafe partial struct LLVMTypeRef : IEquatable<LLVMTypeRef>
|
|||
|
||||
public LLVMContextRef Context => (Handle != IntPtr.Zero) ? LLVM.GetTypeContext(this) : default;
|
||||
|
||||
public LLVMTypeRef ElementType => ((Kind == LLVMTypeKind.LLVMPointerTypeKind) || (Kind == LLVMTypeKind.LLVMArrayTypeKind) || (Kind == LLVMTypeKind.LLVMVectorTypeKind)) ? LLVM.GetElementType(this) : default;
|
||||
public LLVMTypeRef ElementType => (((Kind == LLVMTypeKind.LLVMPointerTypeKind) && (SubtypesCount != 0)) || (Kind == LLVMTypeKind.LLVMArrayTypeKind) || (Kind == LLVMTypeKind.LLVMVectorTypeKind)) ? LLVM.GetElementType(this) : default;
|
||||
|
||||
public uint IntWidth => (Kind == LLVMTypeKind.LLVMIntegerTypeKind) ? LLVM.GetIntTypeWidth(this) : default;
|
||||
|
||||
|
@ -133,8 +133,7 @@ public unsafe partial struct LLVMTypeRef : IEquatable<LLVMTypeRef>
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
var span = new ReadOnlySpan<byte>(pStructName, int.MaxValue);
|
||||
return span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
return SpanExtensions.AsString(pStructName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,7 +207,7 @@ public unsafe partial struct LLVMTypeRef : IEquatable<LLVMTypeRef>
|
|||
|
||||
public void Dump() => LLVM.DumpType(this);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMTypeRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMTypeRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMTypeRef other) => this == other;
|
||||
|
||||
|
@ -224,9 +223,8 @@ public unsafe partial struct LLVMTypeRef : IEquatable<LLVMTypeRef>
|
|||
{
|
||||
return string.Empty;
|
||||
}
|
||||
var span = new ReadOnlySpan<byte>(pStr, int.MaxValue);
|
||||
|
||||
var result = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
var result = SpanExtensions.AsString(pStr);
|
||||
LLVM.DisposeMessage(pStr);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct LLVMUseRef : IEquatable<LLVMUseRef>
|
|||
|
||||
public static bool operator !=(LLVMUseRef left, LLVMUseRef right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMUseRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMUseRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMUseRef other) => this == other;
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
}
|
||||
}
|
||||
|
||||
public LLVMBasicBlockRef EntryBasicBlock => (IsAFunction != null) ? LLVM.GetEntryBasicBlock(this) : default;
|
||||
public LLVMBasicBlockRef EntryBasicBlock => ((IsAFunction != null) && (BasicBlocksCount != 0)) ? LLVM.GetEntryBasicBlock(this) : default;
|
||||
|
||||
public LLVMRealPredicate FCmpPredicate => (Handle != IntPtr.Zero) ? LLVM.GetFCmpPredicate(this) : default;
|
||||
|
||||
|
@ -132,8 +132,7 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
var span = new ReadOnlySpan<byte>(pName, int.MaxValue);
|
||||
return span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
return SpanExtensions.AsString(pName);
|
||||
}
|
||||
|
||||
set
|
||||
|
@ -147,6 +146,8 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public bool HasMetadata => (IsAInstruction != null) && LLVM.HasMetadata(this) != 0;
|
||||
|
||||
public bool HasPersonalityFn => (IsAFunction != null) && LLVM.HasPersonalityFn(this) != 0;
|
||||
|
||||
public bool HasUnnamedAddr
|
||||
{
|
||||
get
|
||||
|
@ -360,7 +361,7 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public LLVMValueRef IsASwitchInst => LLVM.IsASwitchInst(this);
|
||||
|
||||
public LLVMValueRef IsATerminatorInst => LLVM.IsATerminatorInst(this);
|
||||
public LLVMValueRef IsATerminatorInst => (IsAInstruction != null) ? LLVM.IsATerminatorInst(this) : default;
|
||||
|
||||
public LLVMValueRef IsATruncInst => LLVM.IsATruncInst(this);
|
||||
|
||||
|
@ -500,7 +501,7 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
}
|
||||
}
|
||||
|
||||
public uint MDNodeOperandsCount => (Kind != LLVMValueKind.LLVMMetadataAsValueValueKind) ? LLVM.GetMDNodeNumOperands(this) : default;
|
||||
public uint MDNodeOperandsCount => (Kind == LLVMValueKind.LLVMMetadataAsValueValueKind) ? LLVM.GetMDNodeNumOperands(this) : default;
|
||||
|
||||
public string Name
|
||||
{
|
||||
|
@ -518,8 +519,7 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
var span = new ReadOnlySpan<byte>(pStr, int.MaxValue);
|
||||
return span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
return SpanExtensions.AsString(pStr);
|
||||
}
|
||||
|
||||
set
|
||||
|
@ -567,7 +567,7 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
{
|
||||
get
|
||||
{
|
||||
return (IsAFunction != null) ? LLVM.GetPersonalityFn(this) : default;
|
||||
return HasPersonalityFn ? LLVM.GetPersonalityFn(this) : default;
|
||||
}
|
||||
|
||||
set
|
||||
|
@ -600,8 +600,7 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
var span = new ReadOnlySpan<byte>(pSection, int.MaxValue);
|
||||
return span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
return SpanExtensions.AsString(pSection);
|
||||
}
|
||||
|
||||
set
|
||||
|
@ -699,28 +698,8 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public static LLVMValueRef CreateConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstBitCast(ConstantVal, ToType);
|
||||
|
||||
public static LLVMValueRef CreateConstExactSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstExactSDiv(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstExactUDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstExactUDiv(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstExtractElement(LLVMValueRef VectorConstant, LLVMValueRef IndexConstant) => LLVM.ConstExtractElement(VectorConstant, IndexConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstExtractValue(LLVMValueRef AggConstant, uint[] IdxList) => CreateConstExtractValue(AggConstant, IdxList.AsSpan());
|
||||
|
||||
public static LLVMValueRef CreateConstExtractValue(LLVMValueRef AggConstant, ReadOnlySpan<uint> IdxList)
|
||||
{
|
||||
fixed (uint* pIdxList = IdxList)
|
||||
{
|
||||
return LLVM.ConstExtractValue(AggConstant, pIdxList, (uint)IdxList.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public static LLVMValueRef CreateConstFAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstFAdd(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstFDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstFDiv(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstFMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstFMul(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstFNeg(LLVMValueRef ConstantVal) => LLVM.ConstFNeg(ConstantVal);
|
||||
|
||||
public static LLVMValueRef CreateConstFPCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstFPCast(ConstantVal, ToType);
|
||||
|
@ -733,12 +712,10 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public static LLVMValueRef CreateConstFPTrunc(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstFPTrunc(ConstantVal, ToType);
|
||||
|
||||
public static LLVMValueRef CreateConstFRem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstFRem(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstFSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstFSub(LHSConstant, RHSConstant);
|
||||
|
||||
[Obsolete("Use CreateConstGEP2 instead to support opaque pointer")]
|
||||
public static LLVMValueRef CreateConstGEP(LLVMValueRef ConstantVal, LLVMValueRef[] ConstantIndices) => CreateConstGEP(ConstantVal, ConstantIndices.AsSpan());
|
||||
|
||||
[Obsolete("Use CreateConstGEP2 instead to support opaque pointer")]
|
||||
public static LLVMValueRef CreateConstGEP(LLVMValueRef ConstantVal, ReadOnlySpan<LLVMValueRef> ConstantIndices)
|
||||
{
|
||||
fixed (LLVMValueRef* pConstantIndices = ConstantIndices)
|
||||
|
@ -747,8 +724,20 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
}
|
||||
}
|
||||
|
||||
public static LLVMValueRef CreateConstGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef[] ConstantIndices) => CreateConstGEP2(Ty, ConstantVal, ConstantIndices.AsSpan());
|
||||
|
||||
public static LLVMValueRef CreateConstGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, ReadOnlySpan<LLVMValueRef> ConstantIndices)
|
||||
{
|
||||
fixed (LLVMValueRef* pConstantIndices = ConstantIndices)
|
||||
{
|
||||
return LLVM.ConstGEP2(Ty, ConstantVal, (LLVMOpaqueValue**)pConstantIndices, (uint)ConstantIndices.Length);
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Use CreateConstInBoundsGEP2 instead to support opaque pointer")]
|
||||
public static LLVMValueRef CreateConstInBoundsGEP(LLVMValueRef ConstantVal, LLVMValueRef[] ConstantIndices) => CreateConstInBoundsGEP(ConstantVal, ConstantIndices.AsSpan());
|
||||
|
||||
[Obsolete("Use CreateConstInBoundsGEP2 instead to support opaque pointer")]
|
||||
public static LLVMValueRef CreateConstInBoundsGEP(LLVMValueRef ConstantVal, ReadOnlySpan<LLVMValueRef> ConstantIndices)
|
||||
{
|
||||
fixed (LLVMValueRef* pConstantIndices = ConstantIndices)
|
||||
|
@ -757,6 +746,16 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
}
|
||||
}
|
||||
|
||||
public static LLVMValueRef CreateConstInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef[] ConstantIndices) => CreateConstInBoundsGEP2(Ty, ConstantVal, ConstantIndices.AsSpan());
|
||||
|
||||
public static LLVMValueRef CreateConstInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, ReadOnlySpan<LLVMValueRef> ConstantIndices)
|
||||
{
|
||||
fixed (LLVMValueRef* pConstantIndices = ConstantIndices)
|
||||
{
|
||||
return LLVM.ConstInBoundsGEP2(Ty, ConstantVal, (LLVMOpaqueValue**)pConstantIndices, (uint)ConstantIndices.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public static LLVMValueRef CreateConstInlineAsm(LLVMTypeRef Ty, string AsmString, string Constraints, bool HasSideEffects, bool IsAlignStack) => CreateConstInlineAsm(Ty, AsmString.AsSpan(), Constraints.AsSpan(), HasSideEffects, IsAlignStack);
|
||||
|
||||
public static LLVMValueRef CreateConstInlineAsm(LLVMTypeRef Ty, ReadOnlySpan<char> AsmString, ReadOnlySpan<char> Constraints, bool HasSideEffects, bool IsAlignStack)
|
||||
|
@ -768,16 +767,6 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public static LLVMValueRef CreateConstInsertElement(LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant, LLVMValueRef IndexConstant) => LLVM.ConstInsertElement(VectorConstant, ElementValueConstant, IndexConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstInsertValue(LLVMValueRef AggConstant, LLVMValueRef ElementValueConstant, uint[] IdxList) => CreateConstInsertValue(AggConstant, ElementValueConstant, IdxList.AsSpan());
|
||||
|
||||
public static LLVMValueRef CreateConstInsertValue(LLVMValueRef AggConstant, LLVMValueRef ElementValueConstant, ReadOnlySpan<uint> IdxList)
|
||||
{
|
||||
fixed (uint* pIdxList = IdxList)
|
||||
{
|
||||
return LLVM.ConstInsertValue(AggConstant, ElementValueConstant, pIdxList, (uint)IdxList.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public static LLVMValueRef CreateConstInt(LLVMTypeRef IntTy, ulong N, bool SignExtend = false) => LLVM.ConstInt(IntTy, N, SignExtend ? 1 : 0);
|
||||
|
||||
public static LLVMValueRef CreateConstIntCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType, bool isSigned) => LLVM.ConstIntCast(ConstantVal, ToType, isSigned ? 1 : 0);
|
||||
|
@ -872,8 +861,6 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
return LLVM.ConstRealOfStringAndSize(RealTy, marshaledText, (uint)marshaledText.Length);
|
||||
}
|
||||
|
||||
public static LLVMValueRef CreateConstSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstSDiv(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstSelect(LLVMValueRef ConstantCondition, LLVMValueRef ConstantIfTrue, LLVMValueRef ConstantIfFalse) => LLVM.ConstSelect(ConstantCondition, ConstantIfTrue, ConstantIfFalse);
|
||||
|
||||
public static LLVMValueRef CreateConstSExt(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstSExt(ConstantVal, ToType);
|
||||
|
@ -886,8 +873,6 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public static LLVMValueRef CreateConstSIToFP(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstSIToFP(ConstantVal, ToType);
|
||||
|
||||
public static LLVMValueRef CreateConstSRem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstSRem(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstStruct(LLVMValueRef[] ConstantVals, bool Packed) => CreateConstStruct(ConstantVals.AsSpan(), Packed);
|
||||
|
||||
public static LLVMValueRef CreateConstStruct(ReadOnlySpan<LLVMValueRef> ConstantVals, bool Packed)
|
||||
|
@ -904,12 +889,8 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public static LLVMValueRef CreateConstTruncOrBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstTruncOrBitCast(ConstantVal, ToType);
|
||||
|
||||
public static LLVMValueRef CreateConstUDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstUDiv(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstUIToFP(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstUIToFP(ConstantVal, ToType);
|
||||
|
||||
public static LLVMValueRef CreateConstURem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstURem(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstVector(LLVMValueRef[] ScalarConstantVars) => CreateConstVector(ScalarConstantVars.AsSpan());
|
||||
|
||||
public static LLVMValueRef CreateConstVector(ReadOnlySpan<LLVMValueRef> ScalarConstantVars)
|
||||
|
@ -978,7 +959,7 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public void Dump() => LLVM.DumpValue(this);
|
||||
|
||||
public override bool Equals(object obj) => (obj is LLVMValueRef other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is LLVMValueRef other) && Equals(other);
|
||||
|
||||
public bool Equals(LLVMValueRef other) => this == other;
|
||||
|
||||
|
@ -1037,6 +1018,9 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
return result;
|
||||
}
|
||||
|
||||
public LLVMValueRef GetAggregateElement(uint idx) => LLVM.GetAggregateElement(this, idx);
|
||||
|
||||
[Obsolete("Use GetAggregateElement instead")]
|
||||
public LLVMValueRef GetElementAsConstant(uint idx) => LLVM.GetElementAsConstant(this, idx);
|
||||
|
||||
public override int GetHashCode() => Handle.GetHashCode();
|
||||
|
@ -1081,9 +1065,8 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
{
|
||||
return string.Empty;
|
||||
}
|
||||
var span = new ReadOnlySpan<byte>(pStr, int.MaxValue);
|
||||
|
||||
var result = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
|
||||
var result = SpanExtensions.AsString(pStr);
|
||||
LLVM.DisposeMessage(pStr);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct lto_code_gen_t : IEquatable<lto_code_gen_t>
|
|||
|
||||
public static bool operator !=(lto_code_gen_t left, lto_code_gen_t right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is lto_code_gen_t other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is lto_code_gen_t other) && Equals(other);
|
||||
|
||||
public bool Equals(lto_code_gen_t other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct lto_input_t : IEquatable<lto_input_t>
|
|||
|
||||
public static bool operator !=(lto_input_t left, lto_input_t right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is lto_input_t other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is lto_input_t other) && Equals(other);
|
||||
|
||||
public bool Equals(lto_input_t other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct lto_module_t : IEquatable<lto_module_t>
|
|||
|
||||
public static bool operator !=(lto_module_t left, lto_module_t right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is lto_module_t other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is lto_module_t other) && Equals(other);
|
||||
|
||||
public bool Equals(lto_module_t other) => this == other;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public unsafe partial struct thinlto_code_gen_t : IEquatable<thinlto_code_gen_t>
|
|||
|
||||
public static bool operator !=(thinlto_code_gen_t left, thinlto_code_gen_t right) => !(left == right);
|
||||
|
||||
public override bool Equals(object obj) => (obj is thinlto_code_gen_t other) && Equals(other);
|
||||
public override bool Equals(object? obj) => (obj is thinlto_code_gen_t other) && Equals(other);
|
||||
|
||||
public bool Equals(thinlto_code_gen_t other) => this == other;
|
||||
|
||||
|
|
|
@ -1,42 +1,64 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
||||
public unsafe struct MarshaledArray<T, U> : IDisposable
|
||||
where U : unmanaged
|
||||
{
|
||||
public MarshaledArray(ReadOnlySpan<T> inputs, Func<T, U> marshal)
|
||||
{
|
||||
if (inputs.IsEmpty)
|
||||
int length;
|
||||
U* value;
|
||||
|
||||
if (inputs.Length == 0)
|
||||
{
|
||||
Count = 0;
|
||||
Values = null;
|
||||
length = 0;
|
||||
value = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
Count = inputs.Length;
|
||||
Values = ArrayPool<U>.Shared.Rent(Count);
|
||||
length = inputs.Length;
|
||||
|
||||
for (int i = 0; i < Count; i++)
|
||||
#if NET6_0_OR_GREATER
|
||||
value = (U*)NativeMemory.Alloc((uint)(length * sizeof(U)));
|
||||
#else
|
||||
value = (U*)Marshal.AllocHGlobal(length * sizeof(U));
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < inputs.Length; i++)
|
||||
{
|
||||
Values[i] = marshal(inputs[i]);
|
||||
var input = inputs[i];
|
||||
value[i] = marshal(input);
|
||||
}
|
||||
}
|
||||
|
||||
Length = length;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public int Count { get; private set; }
|
||||
public ReadOnlySpan<U> AsSpan() => new ReadOnlySpan<U>(Value, Length);
|
||||
|
||||
public U[] Values { get; private set; }
|
||||
public int Length { get; private set; }
|
||||
|
||||
public static implicit operator ReadOnlySpan<U>(in MarshaledArray<T, U> value) => value.Values;
|
||||
public U* Value { get; private set; }
|
||||
|
||||
public static implicit operator U*(MarshaledArray<T, U> value) => value.Value;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (Values != null)
|
||||
if (Value != null)
|
||||
{
|
||||
ArrayPool<U>.Shared.Return(Values);
|
||||
#if NET6_0_OR_GREATER
|
||||
NativeMemory.Free(Value);
|
||||
#else
|
||||
Marshal.FreeHGlobal((IntPtr)Value);
|
||||
#endif
|
||||
|
||||
Value = null;
|
||||
Length = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,45 +8,62 @@ namespace LLVMSharp.Interop;
|
|||
|
||||
public unsafe struct MarshaledString : IDisposable
|
||||
{
|
||||
public MarshaledString(string? input) : this(input.AsSpan())
|
||||
{
|
||||
}
|
||||
|
||||
public MarshaledString(ReadOnlySpan<char> input)
|
||||
{
|
||||
if (input.IsEmpty)
|
||||
{
|
||||
var value = Marshal.AllocHGlobal(1);
|
||||
Marshal.WriteByte(value, 0, 0);
|
||||
int length = input.Length;
|
||||
sbyte* value;
|
||||
|
||||
Length = 0;
|
||||
Value = (sbyte*)value;
|
||||
}
|
||||
else
|
||||
if (length != 0)
|
||||
{
|
||||
var valueBytes = Encoding.UTF8.GetBytes(input.ToString());
|
||||
var length = valueBytes.Length;
|
||||
var value = Marshal.AllocHGlobal(length + 1);
|
||||
Marshal.Copy(valueBytes, 0, value, length);
|
||||
Marshal.WriteByte(value, length, 0);
|
||||
|
||||
Length = length;
|
||||
Value = (sbyte*)value;
|
||||
length = Encoding.UTF8.GetMaxByteCount(input.Length);
|
||||
}
|
||||
|
||||
#if NET6_0_OR_GREATER
|
||||
value = (sbyte*)NativeMemory.Alloc((uint)(length) + 1);
|
||||
#else
|
||||
value = (sbyte*)Marshal.AllocHGlobal(length + 1);
|
||||
#endif
|
||||
|
||||
if (length != 0)
|
||||
{
|
||||
fixed (char* pInput = input)
|
||||
{
|
||||
length = Encoding.UTF8.GetBytes(pInput, input.Length, (byte*)value, length);
|
||||
}
|
||||
}
|
||||
value[length] = 0;
|
||||
|
||||
Length = length;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public ReadOnlySpan<byte> AsSpan() => new ReadOnlySpan<byte>(Value, Length);
|
||||
|
||||
public int Length { get; private set; }
|
||||
|
||||
public sbyte* Value { get; private set; }
|
||||
|
||||
public static implicit operator sbyte*(MarshaledString value) => value.Value;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (Value != null)
|
||||
{
|
||||
#if NET6_0_OR_GREATER
|
||||
NativeMemory.Free(Value);
|
||||
#else
|
||||
Marshal.FreeHGlobal((IntPtr)Value);
|
||||
#endif
|
||||
|
||||
Value = null;
|
||||
Length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static implicit operator sbyte*(in MarshaledString value) => value.Value;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(Value, Length);
|
||||
|
|
|
@ -4,50 +4,52 @@ using System;
|
|||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
||||
public unsafe struct MarshaledStringArray : IDisposable
|
||||
public unsafe ref struct MarshaledStringArray
|
||||
{
|
||||
private MarshaledString[]? _values;
|
||||
|
||||
public MarshaledStringArray(ReadOnlySpan<string> inputs)
|
||||
{
|
||||
if (inputs.IsEmpty)
|
||||
if (inputs.Length == 0)
|
||||
{
|
||||
Count = 0;
|
||||
Values = null;
|
||||
_values = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
Count = inputs.Length;
|
||||
Values = new MarshaledString[Count];
|
||||
_values = new MarshaledString[inputs.Length];
|
||||
|
||||
for (int i = 0; i < Count; i++)
|
||||
for (var i = 0; i < inputs.Length; i++)
|
||||
{
|
||||
Values[i] = new MarshaledString(inputs[i].AsSpan());
|
||||
_values[i] = new MarshaledString(inputs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int Count { get; private set; }
|
||||
public int Count => (_values is not null) ? _values.Length : 0;
|
||||
|
||||
public MarshaledString[] Values { get; private set; }
|
||||
public ReadOnlySpan<MarshaledString> Values => _values;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (Values != null)
|
||||
if (_values != null)
|
||||
{
|
||||
for (int i = 0; i < Values.Length; i++)
|
||||
for (var i = 0; i < _values.Length; i++)
|
||||
{
|
||||
Values[i].Dispose();
|
||||
_values[i].Dispose();
|
||||
}
|
||||
|
||||
Values = null;
|
||||
Count = 0;
|
||||
_values = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void Fill(sbyte** pDestination)
|
||||
{
|
||||
for (int i = 0; i < Count; i++)
|
||||
if (_values != null)
|
||||
{
|
||||
pDestination[i] = Values[i];
|
||||
for (var i = 0; i < _values.Length; i++)
|
||||
{
|
||||
pDestination[i] = Values[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,24 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
||||
public static unsafe class SpanExtensions
|
||||
{
|
||||
public static string AsString(sbyte* pStr)
|
||||
{
|
||||
#if NET6_0_OR_GREATER
|
||||
var span = MemoryMarshal.CreateReadOnlySpanFromNullTerminated((byte*)(pStr));
|
||||
#else
|
||||
var span = new ReadOnlySpan<byte>(pStr, int.MaxValue);
|
||||
span = span.Slice(0, span.IndexOf((byte)'\0'));
|
||||
#endif
|
||||
return span.AsString();
|
||||
}
|
||||
|
||||
public static string AsString(this Span<byte> self) => AsString((ReadOnlySpan<byte>)self);
|
||||
|
||||
public static string AsString(this ReadOnlySpan<byte> self)
|
||||
|
@ -21,4 +33,30 @@ public static unsafe class SpanExtensions
|
|||
return Encoding.UTF8.GetString(pSelf, self.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public static string AsString(this ReadOnlySpan<ushort> self)
|
||||
{
|
||||
if (self.IsEmpty)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
fixed (ushort* pSelf = self)
|
||||
{
|
||||
return Encoding.Unicode.GetString((byte*)pSelf, self.Length * 2);
|
||||
}
|
||||
}
|
||||
|
||||
public static string AsString(this ReadOnlySpan<uint> self)
|
||||
{
|
||||
if (self.IsEmpty)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
fixed (uint* pSelf = self)
|
||||
{
|
||||
return Encoding.UTF32.GetString((byte*)pSelf, self.Length * 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
@ -20,4 +20,6 @@ public enum LLVMAtomicRMWBinOp
|
|||
LLVMAtomicRMWBinOpUMin,
|
||||
LLVMAtomicRMWBinOpFAdd,
|
||||
LLVMAtomicRMWBinOpFSub,
|
||||
LLVMAtomicRMWBinOpFMax,
|
||||
LLVMAtomicRMWBinOpFMin,
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
@ -22,4 +22,5 @@ public enum LLVMBinaryType
|
|||
LLVMBinaryTypeMachO64L,
|
||||
LLVMBinaryTypeMachO64B,
|
||||
LLVMBinaryTypeWasm,
|
||||
LLVMBinaryTypeOffload,
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
@ -11,6 +11,7 @@ namespace LLVMSharp.Interop;
|
|||
[Flags]
|
||||
public enum LLVMJITSymbolGenericFlags : uint
|
||||
{
|
||||
LLVMJITSymbolGenericFlagsNone = 0,
|
||||
LLVMJITSymbolGenericFlagsExported = 1U << 0,
|
||||
LLVMJITSymbolGenericFlagsWeak = 1U << 1,
|
||||
LLVMJITSymbolGenericFlagsCallable = 1U << 2,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
||||
public enum LLVMMetadataKind
|
||||
{
|
||||
LLVMMDStringMetadataKind,
|
||||
LLVMConstantAsMetadataMetadataKind,
|
||||
LLVMLocalAsMetadataMetadataKind,
|
||||
LLVMDistinctMDOperandPlaceholderMetadataKind,
|
||||
LLVMMDTupleMetadataKind,
|
||||
LLVMDILocationMetadataKind,
|
||||
LLVMDIExpressionMetadataKind,
|
||||
LLVMDIGlobalVariableExpressionMetadataKind,
|
||||
LLVMGenericDINodeMetadataKind,
|
||||
LLVMDISubrangeMetadataKind,
|
||||
LLVMDIEnumeratorMetadataKind,
|
||||
LLVMDIBasicTypeMetadataKind,
|
||||
LLVMDIDerivedTypeMetadataKind,
|
||||
LLVMDICompositeTypeMetadataKind,
|
||||
LLVMDISubroutineTypeMetadataKind,
|
||||
LLVMDIFileMetadataKind,
|
||||
LLVMDICompileUnitMetadataKind,
|
||||
LLVMDISubprogramMetadataKind,
|
||||
LLVMDILexicalBlockMetadataKind,
|
||||
LLVMDILexicalBlockFileMetadataKind,
|
||||
LLVMDINamespaceMetadataKind,
|
||||
LLVMDIModuleMetadataKind,
|
||||
LLVMDITemplateTypeParameterMetadataKind,
|
||||
LLVMDITemplateValueParameterMetadataKind,
|
||||
LLVMDIGlobalVariableMetadataKind,
|
||||
LLVMDILocalVariableMetadataKind,
|
||||
LLVMDILabelMetadataKind,
|
||||
LLVMDIObjCPropertyMetadataKind,
|
||||
LLVMDIImportedEntityMetadataKind,
|
||||
LLVMDIMacroMetadataKind,
|
||||
LLVMDIMacroFileMetadataKind,
|
||||
LLVMDICommonBlockMetadataKind,
|
||||
LLVMDIStringTypeMetadataKind,
|
||||
LLVMDIGenericSubrangeMetadataKind,
|
||||
LLVMDIArgListMetadataKind,
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-14.0.0/llvm/include/llvm-c
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче