Check whether a no-op bitcast or pointer cast is valid.
Declared in <llvm/IR/InstrTypes.h>
static
bool
isBitOrNoopPointerCastable(
Type* SrcTy,
Type* DestTy,
DataLayout const& DL);
This ensures that any pointer<->integer cast has enough bits in the integer and any other cast is a bitcast.
True if the cast is valid and changes no bits.
| Name | Description |
|---|---|
| SrcTy | The source type. |
| DestTy | The destination type. |
| DL | The data layout used to size pointer types. |