[llvm-commits] CVS: llvm/include/Support/Casting.h

Chris Lattner lattner at cs.uiuc.edu
Wed Apr 23 11:18:01 PDT 2003


Changes in directory llvm/include/Support:

Casting.h updated: 1.3 -> 1.4

---
Log message:

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


---
Diffs of the changes:

Index: llvm/include/Support/Casting.h
diff -u llvm/include/Support/Casting.h:1.3 llvm/include/Support/Casting.h:1.4
--- llvm/include/Support/Casting.h:1.3	Wed Jul 24 15:22:09 2002
+++ llvm/include/Support/Casting.h	Wed Apr 23 11:17:28 2003
@@ -211,8 +211,8 @@
 //
 
 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





More information about the llvm-commits mailing list