Allow dyn_cast to operate on things that aren't OBVIOUSLY a pointer type.

These things can be converted to a pointer, like ilist_iterators

llvm-svn: 5861
This commit is contained in:
Chris Lattner 2003-04-23 16:17:28 +00:00
parent 1d6f220a87
commit 215b00589f
1 changed files with 2 additions and 2 deletions

View File

@ -211,8 +211,8 @@ inline typename cast_retty<X, Y*>::ret_type cast_or_null(Y *Val) {
//
template <class X, class Y>
inline typename cast_retty<X, Y*>::ret_type dyn_cast(Y *Val) {
return isa<X>(Val) ? cast<X, Y*>(Val) : 0;
inline typename cast_retty<X, Y>::ret_type dyn_cast(Y Val) {
return isa<X>(Val) ? cast<X, Y>(Val) : 0;
}
// dyn_cast_or_null<X> - Functionally identical to dyn_cast, except that a null