mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5861 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
09ff1509ba
commit
ea0f49e524
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user