Lets isa/cast/dyn_cast query which IR unit an IRUnitRef holds, naming the IR unit itself rather than a pointer to it: dyn_cast<Module>(IR).

Synopsis

Declared in <llvm/IR/IRUnitRef.h>

template<typename To>
struct CastInfo<To, IRUnitRef>;

Static Member Functions

Name

Description

castFailed

Returns null when a cast to To fails.

doCast

Unconditionally casts IR to a pointer to To.

doCastIfPossible

Casts IR to To if possible; otherwise returns castFailed().

isPossible

Returns true if IR holds a To IR unit.

Created with MrDocs