IRValue

public protocol IRValue

An IRValue is a type that is capable of lowering itself to an LLVMValueRef object for use with LLVM’s C API.

  • Retrieves the underlying LLVM value object.

    Declaration

    Swift

    func asLLVM() -> LLVMValueRef
  • isAArgument Extension method

    Whether or not the underlying LLVM value is an Argument

    Declaration

    Swift

    public var isAArgument: Bool
  • isABasicBlock Extension method

    Whether or not the underlying LLVM value is a BasicBlock

    Declaration

    Swift

    public var isABasicBlock: Bool
  • isAInlineAsm Extension method

    Whether or not the underlying LLVM value is InlineAsm

    Declaration

    Swift

    public var isAInlineAsm: Bool
  • isAUser Extension method

    Whether or not the underlying LLVM value is a User

    Declaration

    Swift

    public var isAUser: Bool
  • isAConstant Extension method

    Whether or not the underlying LLVM value is a Constant

    Declaration

    Swift

    public var isAConstant: Bool
  • isABlockAddress Extension method

    Whether or not the underlying LLVM value is a BlockAddress

    Declaration

    Swift

    public var isABlockAddress: Bool
  • isAConstantAggregateZero Extension method

    Whether or not the underlying LLVM value is a ConstantAggregateZero

    Declaration

    Swift

    public var isAConstantAggregateZero: Bool
  • isAConstantArray Extension method

    Whether or not the underlying LLVM value is a ConstantArray

    Declaration

    Swift

    public var isAConstantArray: Bool
  • isAConstantDataSequential Extension method

    Whether or not the underlying LLVM value is a ConstantDataSequential

    Declaration

    Swift

    public var isAConstantDataSequential: Bool
  • isAConstantDataArray Extension method

    Whether or not the underlying LLVM value is a ConstantDataArray

    Declaration

    Swift

    public var isAConstantDataArray: Bool
  • isAConstantDataVector Extension method

    Whether or not the underlying LLVM value is a ConstantDataVector

    Declaration

    Swift

    public var isAConstantDataVector: Bool
  • isAConstantExpr Extension method

    Whether or not the underlying LLVM value is a ConstantExpr

    Declaration

    Swift

    public var isAConstantExpr: Bool
  • isAConstantFP Extension method

    Whether or not the underlying LLVM value is a ConstantFP

    Declaration

    Swift

    public var isAConstantFP: Bool
  • isAConstantInt Extension method

    Whether or not the underlying LLVM value is a ConstantInt

    Declaration

    Swift

    public var isAConstantInt: Bool
  • isAConstantPointerNull Extension method

    Whether or not the underlying LLVM value is a ConstantPointerNull

    Declaration

    Swift

    public var isAConstantPointerNull: Bool
  • isAConstantStruct Extension method

    Whether or not the underlying LLVM value is a ConstantStruct

    Declaration

    Swift

    public var isAConstantStruct: Bool
  • isAConstantTokenNone Extension method

    Whether or not the underlying LLVM value is a ConstantTokenNone

    Declaration

    Swift

    public var isAConstantTokenNone: Bool
  • isAConstantVector Extension method

    Whether or not the underlying LLVM value is a ConstantVector

    Declaration

    Swift

    public var isAConstantVector: Bool
  • isAGlobalValue Extension method

    Whether or not the underlying LLVM value is a GlobalValue

    Declaration

    Swift

    public var isAGlobalValue: Bool
  • isAGlobalAlias Extension method

    Whether or not the underlying LLVM value is a GlobalAlias

    Declaration

    Swift

    public var isAGlobalAlias: Bool
  • isAGlobalObject Extension method

    Whether or not the underlying LLVM value is a GlobalObject

    Declaration

    Swift

    public var isAGlobalObject: Bool
  • isAFunction Extension method

    Whether or not the underlying LLVM value is a Function

    Declaration

    Swift

    public var isAFunction: Bool
  • isAGlobalVariable Extension method

    Whether or not the underlying LLVM value is a GlobalVariable

    Declaration

    Swift

    public var isAGlobalVariable: Bool
  • isAUndefValue Extension method

    Whether or not the underlying LLVM value is an UndefValue

    Declaration

    Swift

    public var isAUndefValue: Bool
  • isAInstruction Extension method

    Whether or not the underlying LLVM value is an Instruction

    Declaration

    Swift

    public var isAInstruction: Bool
  • isABinaryOperator Extension method

    Whether or not the underlying LLVM value is a BinaryOperator

    Declaration

    Swift

    public var isABinaryOperator: Bool
  • isACallInst Extension method

    Whether or not the underlying LLVM value is a CallInst

    Declaration

    Swift

    public var isACallInst: Bool
  • isAIntrinsicInst Extension method

    Whether or not the underlying LLVM value is an IntrinsicInst

    Declaration

    Swift

    public var isAIntrinsicInst: Bool
  • isADbgInfoIntrinsic Extension method

    Whether or not the underlying LLVM value is a DbgInfoIntrinsic

    Declaration

    Swift

    public var isADbgInfoIntrinsic: Bool
  • isADbgDeclareInst Extension method

    Whether or not the underlying LLVM value is a DbgDeclareInst

    Declaration

    Swift

    public var isADbgDeclareInst: Bool
  • isAMemIntrinsic Extension method

    Whether or not the underlying LLVM value is a MemIntrinsic

    Declaration

    Swift

    public var isAMemIntrinsic: Bool
  • isAMemCpyInst Extension method

    Whether or not the underlying LLVM value is a MemCpyInst

    Declaration

    Swift

    public var isAMemCpyInst: Bool
  • isAMemMoveInst Extension method

    Whether or not the underlying LLVM value is a MemMoveInst

    Declaration

    Swift

    public var isAMemMoveInst: Bool
  • isAMemSetInst Extension method

    Whether or not the underlying LLVM value is a MemSetInst

    Declaration

    Swift

    public var isAMemSetInst: Bool
  • isACmpInst Extension method

    Whether or not the underlying LLVM value is a CmpInst

    Declaration

    Swift

    public var isACmpInst: Bool
  • isAFCmpInst Extension method

    Whether or not the underlying LLVM value is a FCmpInst

    Declaration

    Swift

    public var isAFCmpInst: Bool
  • isAICmpInst Extension method

    Whether or not the underlying LLVM value is an ICmpInst

    Declaration

    Swift

    public var isAICmpInst: Bool
  • isAExtractElementInst Extension method

    Whether or not the underlying LLVM value is an ExtractElementInst

    Declaration

    Swift

    public var isAExtractElementInst: Bool
  • isAGetElementPtrInst Extension method

    Whether or not the underlying LLVM value is a GetElementPtrInst

    Declaration

    Swift

    public var isAGetElementPtrInst: Bool
  • isAInsertElementInst Extension method

    Whether or not the underlying LLVM value is an InsertElementInst

    Declaration

    Swift

    public var isAInsertElementInst: Bool
  • isAInsertValueInst Extension method

    Whether or not the underlying LLVM value is an InsertValueInst

    Declaration

    Swift

    public var isAInsertValueInst: Bool
  • isALandingPadInst Extension method

    Whether or not the underlying LLVM value is a LandingPadInst

    Declaration

    Swift

    public var isALandingPadInst: Bool
  • isAPHINode Extension method

    Whether or not the underlying LLVM value is a PHINode

    Declaration

    Swift

    public var isAPHINode: Bool
  • isASelectInst Extension method

    Whether or not the underlying LLVM value is a SelectInst

    Declaration

    Swift

    public var isASelectInst: Bool
  • isAShuffleVectorInst Extension method

    Whether or not the underlying LLVM value is a ShuffleVectorInst

    Declaration

    Swift

    public var isAShuffleVectorInst: Bool
  • isAStoreInst Extension method

    Whether or not the underlying LLVM value is a StoreInst

    Declaration

    Swift

    public var isAStoreInst: Bool
  • isATerminatorInst Extension method

    Whether or not the underlying LLVM value is a TerminatorInst

    Declaration

    Swift

    public var isATerminatorInst: Bool
  • isABranchInst Extension method

    Whether or not the underlying LLVM value is a BranchInst

    Declaration

    Swift

    public var isABranchInst: Bool
  • isAIndirectBrInst Extension method

    Whether or not the underlying LLVM value is an IndirectBrInst

    Declaration

    Swift

    public var isAIndirectBrInst: Bool
  • isAInvokeInst Extension method

    Whether or not the underlying LLVM value is an InvokeInst

    Declaration

    Swift

    public var isAInvokeInst: Bool
  • isAReturnInst Extension method

    Whether or not the underlying LLVM value is a ReturnInst

    Declaration

    Swift

    public var isAReturnInst: Bool
  • isASwitchInst Extension method

    Whether or not the underlying LLVM value is a SwitchInst

    Declaration

    Swift

    public var isASwitchInst: Bool
  • isAUnreachableInst Extension method

    Whether or not the underlying LLVM value is an UnreachableInst

    Declaration

    Swift

    public var isAUnreachableInst: Bool
  • isAResumeInst Extension method

    Whether or not the underlying LLVM value is a ResumeInst

    Declaration

    Swift

    public var isAResumeInst: Bool
  • isACleanupReturnInst Extension method

    Whether or not the underlying LLVM value is a CleanupReturnInst

    Declaration

    Swift

    public var isACleanupReturnInst: Bool
  • isACatchReturnInst Extension method

    Whether or not the underlying LLVM value is a CatchReturnInst

    Declaration

    Swift

    public var isACatchReturnInst: Bool
  • isAFuncletPadInst Extension method

    Whether or not the underlying LLVM value is a FuncletPadInst

    Declaration

    Swift

    public var isAFuncletPadInst: Bool
  • isACatchPadInst Extension method

    Whether or not the underlying LLVM value is a CatchPadInst

    Declaration

    Swift

    public var isACatchPadInst: Bool
  • isACleanupPadInst Extension method

    Whether or not the underlying LLVM value is a CleanupPadInst

    Declaration

    Swift

    public var isACleanupPadInst: Bool
  • isAUnaryInstruction Extension method

    Whether or not the underlying LLVM value is a UnaryInstruction

    Declaration

    Swift

    public var isAUnaryInstruction: Bool
  • isAAllocaInst Extension method

    Whether or not the underlying LLVM value is an AllocaInst

    Declaration

    Swift

    public var isAAllocaInst: Bool
  • isACastInst Extension method

    Whether or not the underlying LLVM value is a CastInst

    Declaration

    Swift

    public var isACastInst: Bool
  • isAAddrSpaceCastInst Extension method

    Whether or not the underlying LLVM value is an AddrSpaceCastInst

    Declaration

    Swift

    public var isAAddrSpaceCastInst: Bool
  • isABitCastInst Extension method

    Whether or not the underlying LLVM value is a BitCastInst

    Declaration

    Swift

    public var isABitCastInst: Bool
  • isAFPExtInst Extension method

    Whether or not the underlying LLVM value is a FPExtInst

    Declaration

    Swift

    public var isAFPExtInst: Bool
  • isAFPToSIInst Extension method

    Whether or not the underlying LLVM value is a FPToSIInst

    Declaration

    Swift

    public var isAFPToSIInst: Bool
  • isAFPToUIInst Extension method

    Whether or not the underlying LLVM value is a FPToUIInst

    Declaration

    Swift

    public var isAFPToUIInst: Bool
  • isAFPTruncInst Extension method

    Whether or not the underlying LLVM value is a FPTruncInst

    Declaration

    Swift

    public var isAFPTruncInst: Bool
  • isAIntToPtrInst Extension method

    Whether or not the underlying LLVM value is an IntToPtrInst

    Declaration

    Swift

    public var isAIntToPtrInst: Bool
  • isAPtrToIntInst Extension method

    Whether or not the underlying LLVM value is a PtrToIntInst

    Declaration

    Swift

    public var isAPtrToIntInst: Bool
  • isASExtInst Extension method

    Whether or not the underlying LLVM value is a SExtInst

    Declaration

    Swift

    public var isASExtInst: Bool
  • isASIToFPInst Extension method

    Whether or not the underlying LLVM value is a SIToFPInst

    Declaration

    Swift

    public var isASIToFPInst: Bool
  • isATruncInst Extension method

    Whether or not the underlying LLVM value is a TruncInst

    Declaration

    Swift

    public var isATruncInst: Bool
  • isAUIToFPInst Extension method

    Whether or not the underlying LLVM value is a UIToFPInst

    Declaration

    Swift

    public var isAUIToFPInst: Bool
  • isAZExtInst Extension method

    Whether or not the underlying LLVM value is a ZExtInst

    Declaration

    Swift

    public var isAZExtInst: Bool
  • isAExtractValueInst Extension method

    Whether or not the underlying LLVM value is a ExtractValueInst

    Declaration

    Swift

    public var isAExtractValueInst: Bool
  • isALoadInst Extension method

    Whether or not the underlying LLVM value is a LoadInst

    Declaration

    Swift

    public var isALoadInst: Bool
  • isAVAArgInst Extension method

    Whether or not the underlying LLVM value is a VAArgInst

    Declaration

    Swift

    public var isAVAArgInst: Bool
  • type Extension method

    Retrieves the type of this value.

    Declaration

    Swift

    public var type: IRType
  • alignment Extension method

    Retrieves the alignment of this value.

    Declaration

    Swift

    public var alignment: Int
  • isConstant Extension method

    Returns whether this value is a constant.

    Declaration

    Swift

    public var isConstant: Bool
  • isUndef Extension method

    Returns whether this value has been initialized with the special undef value.

    The undef value can be used anywhere a constant is expected, and indicates that the user of the value may receive an unspecified bit-pattern.

    Declaration

    Swift

    public var isUndef: Bool
  • name Extension method

    Gets and sets the name for this value.

    Declaration

    Swift

    public var name: String
  • constGEP(indices:) Extension method

    Perform a GEP (Get Element Pointer) with this value as the base.

    Declaration

    Swift

    public func constGEP(indices: [IRValue]) -> IRValue

    Parameters

    indices

    A list of indices that indicate which of the elements of the aggregate object are indexed.

    Return Value

    A value representing the address of a subelement of the given aggregate data structure value.

  • replaceAllUses(with:) Extension method

    Replaces all uses of this value with the specified value.

    Declaration

    Swift

    public func replaceAllUses(with value: IRValue)

    Parameters

    value

    The new value to swap in.

  • dump() Extension method

    Dumps a representation of this value to stderr.

    Declaration

    Swift

    public func dump()