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
The inverse‐cast constant, or null if no lossless inverse exists.
Parameters
Name |
Description |
C |
Constant to invert through |
InvCastTo |
Type of the inverse‐cast result. |
CastOp |
Cast opcode that maps the result back to |
DL |
Data layout used for type sizes and pointer widths. |
Flags |
Optional out‐parameter for preserved cast flags. |
Created with MrDocs