Infer the cast opcode for a value and destination type.

Synopsis

Declared in <llvm/IR/InstrTypes.h>

static
Instruction::CastOps
getCastOpcode(
    Value const* Val,
    bool SrcIsSigned,
    Type* Ty,
    bool DstIsSigned);

Description

Returns the opcode necessary to cast Val into Ty using usual casting rules.

Return Value

The cast opcode for the conversion.

Parameters

Name

Description

Val

The value to cast.

SrcIsSigned

Whether to treat the source as signed.

Ty

The destination type.

DstIsSigned

Whether to treat the destination as signed.

Created with MrDocs