Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerating bindings for LLVM 11.0.0 #151

Merged
merged 3 commits into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<Company>Microsoft</Company>
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(Configuration)/</PackageOutputPath>
<Product>LLVMSharp</Product>
<VersionPrefix>10.0.0</VersionPrefix>
<VersionPrefix>11.0.0</VersionPrefix>
<VersionSuffix>beta</VersionSuffix>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<!-- Package versions for package references across all projects -->
<ItemGroup>
<PackageReference Update="libLLVM" Version="10.0.0" />
<PackageReference Update="libLLVM" Version="11.0.0" />
<PackageReference Update="Microsoft.Bcl.HashCode" Version="1.1.0" />
<PackageReference Update="Microsoft.Net.Compilers.Toolset" Version="3.5.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.5.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libLLVM.runtime.freebsd.11-x64</id>
<version>10.0.0</version>
<version>11.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/llvmsharp</projectUrl>
<description>freebsd 11 x64 native library for libLLVM.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-10.0.0" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-11.0.0" />
</metadata>
<files>
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libLLVM.runtime.freebsd.11-x86</id>
<version>10.0.0</version>
<version>11.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/llvmsharp</projectUrl>
<description>freebsd 11 x86 native library for libLLVM.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-10.0.0" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-11.0.0" />
</metadata>
<files>
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libLLVM.runtime.linux-arm</id>
<version>10.0.0</version>
<version>11.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/llvmsharp</projectUrl>
<description>linux arm native library for libLLVM.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-10.0.0" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-11.0.0" />
</metadata>
<files>
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libLLVM.runtime.linux-arm64</id>
<version>10.0.0</version>
<version>11.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/llvmsharp</projectUrl>
<description>linux arm64 native library for libLLVM.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-10.0.0" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-11.0.0" />
</metadata>
<files>
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libLLVM.runtime.osx-x64</id>
<version>10.0.0</version>
<version>11.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/llvmsharp</projectUrl>
<description>osx x64 native library for libLLVM.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-10.0.0" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-11.0.0" />
</metadata>
<files>
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libLLVM.runtime.sles-x64</id>
<version>10.0.0</version>
<version>11.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/llvmsharp</projectUrl>
<description>sles x64 native library for libLLVM.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-10.0.0" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-11.0.0" />
</metadata>
<files>
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libLLVM.runtime.ubuntu.16.04-x64</id>
<version>10.0.0</version>
<version>11.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/llvmsharp</projectUrl>
<description>ubuntu 16.04 x64 native library for libLLVM.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-10.0.0" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-11.0.0" />
</metadata>
<files>
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libLLVM.runtime.ubuntu.18.04-x64</id>
<version>10.0.0</version>
<version>11.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/llvmsharp</projectUrl>
<description>ubuntu 18.04 x64 native library for libLLVM.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-10.0.0" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-11.0.0" />
</metadata>
<files>
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libLLVM.runtime.ubuntu.20.04-x64</id>
<version>10.0.0</version>
<version>11.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/llvmsharp</projectUrl>
<description>ubuntu 20.04 x64 native library for libLLVM.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-10.0.0" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-11.0.0" />
</metadata>
<files>
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libLLVM.runtime.win-x64</id>
<version>10.0.0</version>
<version>11.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/llvmsharp</projectUrl>
<description>win x64 native library for libLLVM.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-10.0.0" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-11.0.0" />
</metadata>
<files>
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libLLVM.runtime.win-x86</id>
<version>10.0.0</version>
<version>11.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/llvmsharp</projectUrl>
<description>win x86 native library for libLLVM.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-10.0.0" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-11.0.0" />
</metadata>
<files>
<file src="..\libLLVM\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
4 changes: 2 additions & 2 deletions packages/libLLVM/libLLVM/libLLVM.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libLLVM</id>
<version>10.0.0</version>
<version>11.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/llvmsharp</projectUrl>
<description>Multi-platform native library for libLLVM.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-10.0.0" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-11.0.0" />
<dependencies>
<group targetFramework=".NETStandard1.0">
<dependency id="Microsoft.NETCore.Platforms" version="1.0.1" />
Expand Down
22 changes: 11 additions & 11 deletions packages/libLLVM/libLLVM/runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,57 @@
"runtimes": {
"freebsd.11-x64": {
"libLLVM": {
"libLLVM.runtime.freebsd.11-x64": "10.0.0"
"libLLVM.runtime.freebsd.11-x64": "11.0.0"
}
},
"freebsd.11-x86": {
"libLLVM": {
"libLLVM.runtime.freebsd.11-x86": "10.0.0"
"libLLVM.runtime.freebsd.11-x86": "11.0.0"
}
},
"linux-arm": {
"libLLVM": {
"libLLVM.runtime.linux-arm": "10.0.0"
"libLLVM.runtime.linux-arm": "11.0.0"
}
},
"linux-arm64": {
"libLLVM": {
"libLLVM.runtime.linux-arm64": "10.0.0"
"libLLVM.runtime.linux-arm64": "11.0.0"
}
},
"osx-x64": {
"libLLVM": {
"libLLVM.runtime.osx-x64": "10.0.0"
"libLLVM.runtime.osx-x64": "11.0.0"
}
},
"sles-x64": {
"libLLVM": {
"libLLVM.runtime.sles-x64": "10.0.0"
"libLLVM.runtime.sles-x64": "11.0.0"
}
},
"ubuntu.16.04-x64": {
"libLLVM": {
"libLLVM.runtime.ubuntu.16.04-x64": "10.0.0"
"libLLVM.runtime.ubuntu.16.04-x64": "11.0.0"
}
},
"ubuntu.18.04-x64": {
"libLLVM": {
"libLLVM.runtime.ubuntu.18.04-x64": "10.0.0"
"libLLVM.runtime.ubuntu.18.04-x64": "11.0.0"
}
},
"ubuntu.20.04-x64": {
"libLLVM": {
"libLLVM.runtime.ubuntu.20.04-x64": "10.0.0"
"libLLVM.runtime.ubuntu.20.04-x64": "11.0.0"
}
},
"win-x64": {
"libLLVM": {
"libLLVM.runtime.win-x64": "10.0.0"
"libLLVM.runtime.win-x64": "11.0.0"
}
},
"win-x86": {
"libLLVM": {
"libLLVM.runtime.win-x86": "10.0.0"
"libLLVM.runtime.win-x86": "11.0.0"
}
}
}
Expand Down
24 changes: 24 additions & 0 deletions sources/LLVMSharp/Attribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information.

using System;
using LLVMSharp.Interop;

namespace LLVMSharp
{
public sealed class Attribute : IEquatable<Attribute>
{
public LLVMAttributeRef Handle { get; }

public static bool operator ==(Attribute left, Attribute right) => ReferenceEquals(left, right) || (left?.Handle == right?.Handle);

public static bool operator !=(Attribute left, Attribute right) => !(left == right);

public override bool Equals(object obj) => (obj is Attribute other) && Equals(other);

public bool Equals(Attribute other) => this == other;

public override int GetHashCode() => Handle.GetHashCode();

public override string ToString() => Handle.ToString();
}
}
46 changes: 12 additions & 34 deletions sources/LLVMSharp/DataLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,30 @@ public DataLayout(ReadOnlySpan<char> stringRep)

public LLVMTargetDataRef Handle { get; }

public StructLayout GetStructLayout(StructType structType)
{
return new StructLayout(this, structType);
}
public StructLayout GetStructLayout(StructType structType) => new StructLayout(this, structType);

public ulong GetTypeSizeInBits(Type type)
{
return Handle.SizeOfTypeInBits(type.Handle);
}
public ulong GetTypeSizeInBits(Type type) => Handle.SizeOfTypeInBits(type.Handle);

public ulong GetTypeStoreSize(Type type)
{
return Handle.StoreSizeOfType(type.Handle);
}
public ulong GetTypeStoreSize(Type type) => Handle.StoreSizeOfType(type.Handle);

public ulong GetTypeAllocSize(Type type)
{
return Handle.ABISizeOfType(type.Handle);
}
public ulong GetTypeAllocSize(Type type) => Handle.ABISizeOfType(type.Handle);

public uint GetABITypeAlignment(Type type)
{
return Handle.ABIAlignmentOfType(type.Handle);
}
public uint GetABITypeAlignment(Type type) => Handle.ABIAlignmentOfType(type.Handle);

public uint GetPrefTypeAlignment(Type type)
{
return Handle.PreferredAlignmentOfType(type.Handle);
}
public uint GetPrefTypeAlignment(Type type) => Handle.PreferredAlignmentOfType(type.Handle);

public uint GetPreferredAlign(Value value)
{
return Handle.PreferredAlignmentOfGlobal(value.Handle);
}
public uint GetPreferredAlign(Value value) => Handle.PreferredAlignmentOfGlobal(value.Handle);

public static bool operator ==(DataLayout left, DataLayout right) => (left is object) ? ((right is object) && (left.Handle == right.Handle)) : (right is null);
public static bool operator ==(DataLayout left, DataLayout right) => ReferenceEquals(left, right) || (left?.Handle == right?.Handle);

public static bool operator !=(DataLayout left, DataLayout right) => (left is object) ? ((right is null) || (left.Handle != right.Handle)) : (right is object);
public static bool operator !=(DataLayout left, DataLayout right) => !(left == right);

public override bool Equals(object obj) => (obj is DataLayout other) && Equals(other);

public bool Equals(DataLayout other) => this == other;

public override int GetHashCode()
{
return Handle.GetHashCode();
}
public override int GetHashCode() => Handle.GetHashCode();

public override string ToString() => Handle.ToString();
}
}
Loading