llvm::CastInst::CreateFPCast

Create a floating-point extension, bitcast, or truncation.

Synopsis

Declared in <llvm/IR/InstrTypes.h>

static
CastInst*
CreateFPCast(
    Value* S,
    Type* Ty,
    Twine const& Name = "",
    InsertPosition InsertBefore = nullptr);

Return Value

The newly created cast instruction.

Parameters

NameDescription
SThe floating-point value to cast.
TyThe destination floating-point type.
NameOptional name for the instruction.
InsertBeforeOptional insertion position.