Try to cast C to InvC losslessly, satisfying CastOp(InvC) equals C, or CastOp(InvC) is a refined value of undefined C. Will try best to preserve the flags.

Synopsis

Declared in <llvm/Analysis/ConstantFolding.h>

Constant*
getLosslessInvCast(
    Constant* C,
    Type* InvCastTo,
    unsigned int CastOp,
    DataLayout const& DL,
    PreservedCastFlags* Flags = nullptr);

Return Value

This is an important base class in LLVM. It provides the common facilities of all constant values in an LLVM program. A constant is a value that is immutable at runtime. Functions are constants because their address is immutable. Same with global variables.

Parameters

Name

Description

C

This is an important base class in LLVM. It provides the common facilities of all constant values in an LLVM program. A constant is a value that is immutable at runtime. Functions are constants because their address is immutable. Same with global variables.

InvCastTo

The instances of the Type class are immutable: once they are created, they are never changed. Also note that only one instance of a particular type is ever created. Thus seeing if two types are equal is a matter of doing a trivial pointer comparison. To enforce that no two equal instances are created, Type instances can only be created via static factory methods in class Type and in derived classes. Once allocated, Types are never free'd.

DL

A parsed version of the target data layout string in and methods for querying it.

Created with MrDocs