Skip to content

Commit

Permalink
Regenerating bindings for LLVM v18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding committed Apr 29, 2024
1 parent 6aa85f6 commit 2ddb081
Show file tree
Hide file tree
Showing 16 changed files with 380 additions and 556 deletions.
59 changes: 59 additions & 0 deletions sources/LLVMSharp.Interop/Extensions/LLVMPassBuilderOptionsRef.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// 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;

namespace LLVMSharp.Interop;

public unsafe partial struct LLVMPassBuilderOptionsRef(IntPtr handle) : IEquatable<LLVMPassBuilderOptionsRef>, IDisposable
{
public IntPtr Handle = handle;

public static implicit operator LLVMPassBuilderOptionsRef(LLVMOpaquePassBuilderOptions* value) => new LLVMPassBuilderOptionsRef((IntPtr)value);

public static implicit operator LLVMOpaquePassBuilderOptions*(LLVMPassBuilderOptionsRef value) => (LLVMOpaquePassBuilderOptions*)value.Handle;

public static bool operator ==(LLVMPassBuilderOptionsRef left, LLVMPassBuilderOptionsRef right) => left.Handle == right.Handle;

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

public static LLVMPassBuilderOptionsRef Create() => LLVM.CreatePassBuilderOptions();

public void Dispose()
{
if (Handle != IntPtr.Zero)
{
LLVM.DisposePassBuilderOptions(this);
Handle = IntPtr.Zero;
}
}

public override readonly bool Equals(object? obj) => (obj is LLVMPassBuilderOptionsRef other) && Equals(other);

public readonly bool Equals(LLVMPassBuilderOptionsRef other) => this == other;

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

public readonly void SetCallGraphProfile(bool CallGraphProfile) => LLVM.PassBuilderOptionsSetCallGraphProfile(this, CallGraphProfile ? 1 : 0);

public readonly void SetDebugLogging(bool DebugLogging) => LLVM.PassBuilderOptionsSetDebugLogging(this, DebugLogging ? 1 : 0);

public readonly void SetForgetAllSCEVInLoopUnroll(bool ForgetAllSCEVInLoopUnroll) => LLVM.PassBuilderOptionsSetForgetAllSCEVInLoopUnroll(this, ForgetAllSCEVInLoopUnroll ? 1 : 0);

public readonly void SetInlinerThreshold(int Threshold) => LLVM.PassBuilderOptionsSetInlinerThreshold(this, Threshold);

public readonly void SetLicmMssaNoAccForPromotionCap(uint LicmMssaNoAccForPromotionCap) => LLVM.PassBuilderOptionsSetLicmMssaNoAccForPromotionCap(this, LicmMssaNoAccForPromotionCap);

public readonly void SetLicmMssaOptCap(uint LicmMssaOptCap) => LLVM.PassBuilderOptionsSetLicmMssaOptCap(this, LicmMssaOptCap);

public readonly void SetLoopInterleaving(bool LoopInterleaving) => LLVM.PassBuilderOptionsSetLoopInterleaving(this, LoopInterleaving ? 1 : 0);

public readonly void SetLoopUnrolling(bool LoopUnrolling) => LLVM.PassBuilderOptionsSetLoopUnrolling(this, LoopUnrolling ? 1 : 0);

public readonly void SetLoopVectorization(bool LoopVectorization) => LLVM.PassBuilderOptionsSetLoopVectorization(this, LoopVectorization ? 1 : 0);

public readonly void SetMergeFunctions(bool MergeFunctions) => LLVM.PassBuilderOptionsSetMergeFunctions(this, MergeFunctions ? 1 : 0);

public readonly void SetSLPVectorization(bool SLPVectorization) => LLVM.PassBuilderOptionsSetSLPVectorization(this, SLPVectorization ? 1 : 0);

public readonly void SetVerifyEach(bool VerifyEach) => LLVM.PassBuilderOptionsSetVerifyEach(this, VerifyEach ? 1 : 0);
}
49 changes: 0 additions & 49 deletions sources/LLVMSharp.Interop/Extensions/LLVMPassManagerBuilderRef.cs

This file was deleted.

110 changes: 0 additions & 110 deletions sources/LLVMSharp.Interop/Extensions/LLVMPassManagerRef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,116 +18,6 @@ public unsafe partial struct LLVMPassManagerRef(IntPtr handle) : IDisposable, IE

public static LLVMPassManagerRef Create() => LLVM.CreatePassManager();

public readonly void AddAggressiveDCEPass() => LLVM.AddAggressiveDCEPass(this);

public readonly void AddAlignmentFromAssumptionsPass() => LLVM.AddAlignmentFromAssumptionsPass(this);

public readonly void AddAlwaysInlinerPass() => LLVM.AddAlwaysInlinerPass(this);

public readonly void AddBasicAliasAnalysisPass() => LLVM.AddBasicAliasAnalysisPass(this);

public readonly void AddBitTrackingDCEPass() => LLVM.AddBitTrackingDCEPass(this);

public readonly void AddCalledValuePropagationPass() => LLVM.AddCalledValuePropagationPass(this);

public readonly void AddCFGSimplificationPass() => LLVM.AddCFGSimplificationPass(this);

public readonly void AddConstantMergePass() => LLVM.AddConstantMergePass(this);

public readonly void AddCorrelatedValuePropagationPass() => LLVM.AddCorrelatedValuePropagationPass(this);

public readonly void AddDCEPass() => LLVM.AddDCEPass(this);

public readonly void AddDeadArgEliminationPass() => LLVM.AddDeadArgEliminationPass(this);

public readonly void AddDeadStoreEliminationPass() => LLVM.AddDeadStoreEliminationPass(this);

public readonly void AddDemoteMemoryToRegisterPass() => LLVM.AddDemoteMemoryToRegisterPass(this);

public readonly void AddEarlyCSEMemSSAPass() => LLVM.AddEarlyCSEMemSSAPass(this);

public readonly void AddEarlyCSEPass() => LLVM.AddEarlyCSEPass(this);

public readonly void AddFunctionAttrsPass() => LLVM.AddFunctionAttrsPass(this);

public readonly void AddFunctionInliningPass() => LLVM.AddFunctionInliningPass(this);

public readonly void AddGlobalDCEPass() => LLVM.AddGlobalDCEPass(this);

public readonly void AddGlobalOptimizerPass() => LLVM.AddGlobalOptimizerPass(this);

public readonly void AddGVNPass() => LLVM.AddGVNPass(this);

public readonly void AddIndVarSimplifyPass() => LLVM.AddIndVarSimplifyPass(this);

public readonly void AddInstructionCombiningPass() => LLVM.AddInstructionCombiningPass(this);

public readonly void AddInternalizePass(uint AllButMain) => LLVM.AddInternalizePass(this, AllButMain);

public readonly void AddIPSCCPPass() => LLVM.AddIPSCCPPass(this);

public readonly void AddJumpThreadingPass() => LLVM.AddJumpThreadingPass(this);

public readonly void AddLICMPass() => LLVM.AddLICMPass(this);

public readonly void AddLoopDeletionPass() => LLVM.AddLoopDeletionPass(this);

public readonly void AddLoopIdiomPass() => LLVM.AddLoopIdiomPass(this);

public readonly void AddLoopRerollPass() => LLVM.AddLoopRerollPass(this);

public readonly void AddLoopRotatePass() => LLVM.AddLoopRotatePass(this);

public readonly void AddLoopUnrollPass() => LLVM.AddLoopUnrollPass(this);

public readonly void AddLoopVectorizePass() => LLVM.AddLoopVectorizePass(this);

public readonly void AddLowerConstantIntrinsicsPass() => LLVM.AddLowerConstantIntrinsicsPass(this);

public readonly void AddLowerExpectIntrinsicPass() => LLVM.AddLowerExpectIntrinsicPass(this);

public readonly void AddLowerSwitchPass() => LLVM.AddLowerSwitchPass(this);

public readonly void AddMemCpyOptPass() => LLVM.AddMemCpyOptPass(this);

public readonly void AddMergedLoadStoreMotionPass() => LLVM.AddMergedLoadStoreMotionPass(this);

public readonly void AddMergeFunctionsPass() => LLVM.AddMergeFunctionsPass(this);

public readonly void AddNewGVNPass() => LLVM.AddNewGVNPass(this);

public readonly void AddPartiallyInlineLibCallsPass() => LLVM.AddPartiallyInlineLibCallsPass(this);

public readonly void AddPromoteMemoryToRegisterPass() => LLVM.AddPromoteMemoryToRegisterPass(this);

public readonly void AddReassociatePass() => LLVM.AddReassociatePass(this);

public readonly void AddScalarizerPass() => LLVM.AddScalarizerPass(this);

public readonly void AddScalarReplAggregatesPass() => LLVM.AddScalarReplAggregatesPass(this);

public readonly void AddScalarReplAggregatesPassSSA() => LLVM.AddScalarReplAggregatesPassSSA(this);

public readonly void AddScalarReplAggregatesPassWithThreshold(int Threshold) => LLVM.AddScalarReplAggregatesPassWithThreshold(this, Threshold);

public readonly void AddSCCPPass() => LLVM.AddSCCPPass(this);

public readonly void AddScopedNoAliasAAPass() => LLVM.AddScopedNoAliasAAPass(this);

public readonly void AddSimplifyLibCallsPass() => LLVM.AddSimplifyLibCallsPass(this);

public readonly void AddSLPVectorizePass() => LLVM.AddSLPVectorizePass(this);

public readonly void AddStripDeadPrototypesPass() => LLVM.AddStripDeadPrototypesPass(this);

public readonly void AddStripSymbolsPass() => LLVM.AddStripSymbolsPass(this);

public readonly void AddTailCallEliminationPass() => LLVM.AddTailCallEliminationPass(this);

public readonly void AddTypeBasedAliasAnalysisPass() => LLVM.AddTypeBasedAliasAnalysisPass(this);

public readonly void AddVerifierPass() => LLVM.AddVerifierPass(this);

public void Dispose()
{
if (Handle != IntPtr.Zero)
Expand Down
4 changes: 4 additions & 0 deletions sources/LLVMSharp.Interop/Extensions/LLVMTypeRef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public unsafe partial struct LLVMTypeRef(IntPtr handle) : IEquatable<LLVMTypeRef

public readonly uint ArrayLength => (Kind == LLVMTypeKind.LLVMArrayTypeKind) ? LLVM.GetArrayLength(this) : default;

public readonly ulong ArrayLength2 => (Kind == LLVMTypeKind.LLVMArrayTypeKind) ? LLVM.GetArrayLength2(this) : default;

public readonly LLVMContextRef Context => (Handle != IntPtr.Zero) ? LLVM.GetTypeContext(this) : default;

public readonly LLVMTypeRef ElementType => (((Kind == LLVMTypeKind.LLVMPointerTypeKind) && (SubtypesCount != 0)) || (Kind == LLVMTypeKind.LLVMArrayTypeKind) || (Kind == LLVMTypeKind.LLVMVectorTypeKind)) ? LLVM.GetElementType(this) : default;
Expand Down Expand Up @@ -118,6 +120,8 @@ public static LLVMTypeRef CreateFunction(LLVMTypeRef ReturnType, ReadOnlySpan<LL

public static LLVMTypeRef CreateArray(LLVMTypeRef ElementType, uint ElementCount) => LLVM.ArrayType(ElementType, ElementCount);

public static LLVMTypeRef CreateArray2(LLVMTypeRef ElementType, ulong ElementCount) => LLVM.ArrayType2(ElementType, ElementCount);

public static LLVMTypeRef CreateInt(uint NumBits) => LLVM.IntType(NumBits);

public static LLVMTypeRef CreateIntPtr(LLVMTargetDataRef TD) => LLVM.IntPtrType(TD);
Expand Down
Loading

0 comments on commit 2ddb081

Please sign in to comment.