ΒΆtemplate <class X, class Y>
inline typename CastInfo<X, std::unique_ptr<Y>>::
    CastResultType
    unique_dyn_cast(std::unique_ptr<Y>& Val)

Description

unique_dyn_cast <X > - Given a unique_ptr <Y >, try to return a unique_ptr <X >, taking ownership of the input pointer iff isa <X >(Val) is true. If the cast is successful, From refers to nullptr on exit and the casted value is returned. If the cast is unsuccessful, the function returns nullptr and From is unchanged.

Declared at: llvm/include/llvm/Support/Casting.h:773

Templates

X
Y

Parameters

std::unique_ptr<Y>& Val