diff options
author | Chris Lattner <sabre@nondot.org> | 2003-04-23 16:17:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-04-23 16:17:28 +0000 |
commit | ea0f49e52436272c65b52fe1e83f5009aa191a21 (patch) | |
tree | 0061d488f01a8684316b8783418295a5cbdf45f7 /include/Support | |
parent | 09ff1509ba077cfd702c64a51a433798d23567b2 (diff) | |
download | external_llvm-ea0f49e52436272c65b52fe1e83f5009aa191a21.zip external_llvm-ea0f49e52436272c65b52fe1e83f5009aa191a21.tar.gz external_llvm-ea0f49e52436272c65b52fe1e83f5009aa191a21.tar.bz2 |
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
Diffstat (limited to 'include/Support')
-rw-r--r-- | include/Support/Casting.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/Support/Casting.h b/include/Support/Casting.h index e0d50fe..ba0a99a 100644 --- a/include/Support/Casting.h +++ b/include/Support/Casting.h @@ -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 |