forked from OSchip/llvm-project
parent
400d1f44d1
commit
1e25a97ae2
|
@ -108,6 +108,8 @@ public:
|
||||||
/// or a derived class thereof, a NULL canonical type.
|
/// or a derived class thereof, a NULL canonical type.
|
||||||
template<typename U> CanProxy<U> getAs() const;
|
template<typename U> CanProxy<U> getAs() const;
|
||||||
|
|
||||||
|
template<typename U> CanProxy<U> castAs() const;
|
||||||
|
|
||||||
/// \brief Overloaded arrow operator that produces a canonical type
|
/// \brief Overloaded arrow operator that produces a canonical type
|
||||||
/// proxy.
|
/// proxy.
|
||||||
CanProxy<T> operator->() const;
|
CanProxy<T> operator->() const;
|
||||||
|
@ -752,6 +754,13 @@ CanProxy<U> CanQual<T>::getAs() const {
|
||||||
return CanProxy<U>();
|
return CanProxy<U>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
template<typename U>
|
||||||
|
CanProxy<U> CanQual<T>::castAs() const {
|
||||||
|
assert(!Stored.isNull() && isa<U>(Stored.getTypePtr()));
|
||||||
|
return CanQual<U>::CreateUnsafe(Stored);
|
||||||
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
CanProxy<T> CanQual<T>::operator->() const {
|
CanProxy<T> CanQual<T>::operator->() const {
|
||||||
return CanProxy<T>(*this);
|
return CanProxy<T>(*this);
|
||||||
|
|
Loading…
Reference in New Issue