Table of Contents

Method ThrowIfInvalid

Namespace
Ubiquity.NET.Llvm.Values
Assembly
Ubiquity.NET.Llvm.dll

ThrowIfInvalid(AttributeInfo, string?)

Validates an AttributeInfo

public static void ThrowIfInvalid(this AttributeInfo self, string? name = null)

Parameters

self AttributeInfo

AttributeInfo to validate

name string

Name of the attribute self [Normally generated by compiler]

Exceptions

ArgumentException

Attribute is invalid or not supported on the specified index

ThrowIfInvalid(AttributeInfo, AttributeAllowedOn, AttributeArgKind, string?)

Validates an AttributeInfo

public static void ThrowIfInvalid(this AttributeInfo self, AttributeAllowedOn allowedOn, AttributeArgKind kind, string? name = null)

Parameters

self AttributeInfo

AttributeInfo to validate

allowedOn AttributeAllowedOn

location to validate the attribute supports

kind AttributeArgKind

Required kind of argument for the attribute

name string

Name of the attribute self [Normally generated by compiler]

Exceptions

ArgumentException

Attribute is invalid or not supported on the specified index

ThrowIfInvalid(AttributeInfo, FunctionAttributeIndex, string?)

Throws an exception if the attribute is invalid for the given index

public static void ThrowIfInvalid(this AttributeInfo self, FunctionAttributeIndex index, string? name = null)

Parameters

self AttributeInfo

AttributeInfo to test

index FunctionAttributeIndex

Function index to test if the attribute is valid for

name string

Name of the expression creating this test [Normally provided by compiler]

Exceptions

InvalidEnumArgumentException

Index is invalid

ArgumentException

Attribute is not valid or not valid on the given index.