summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/Support/Casting.h6
-rw-r--r--include/llvm/Support/Casting.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/include/Support/Casting.h b/include/Support/Casting.h
index ba0a99a559..491d165083 100644
--- a/include/Support/Casting.h
+++ b/include/Support/Casting.h
@@ -207,7 +207,7 @@ inline typename cast_retty<X, Y*>::ret_type cast_or_null(Y *Val) {
// be used to test for a type as well as cast if successful. This should be
// used in the context of an if statement like this:
//
-// if (const Instruction *I = dyn_cast<const Instruction>(myVal)) { ... }
+// if (const Instruction *I = dyn_cast<Instruction>(myVal)) { ... }
//
template <class X, class Y>
@@ -219,8 +219,8 @@ inline typename cast_retty<X, Y>::ret_type dyn_cast(Y Val) {
// value is accepted.
//
template <class X, class Y>
-inline typename cast_retty<X, Y*>::ret_type dyn_cast_or_null(Y *Val) {
- return (Val && isa<X>(Val)) ? cast<X, Y*>(Val) : 0;
+inline typename cast_retty<X, Y>::ret_type dyn_cast_or_null(Y Val) {
+ return (Val && isa<X>(Val)) ? cast<X, Y>(Val) : 0;
}
diff --git a/include/llvm/Support/Casting.h b/include/llvm/Support/Casting.h
index ba0a99a559..491d165083 100644
--- a/include/llvm/Support/Casting.h
+++ b/include/llvm/Support/Casting.h
@@ -207,7 +207,7 @@ inline typename cast_retty<X, Y*>::ret_type cast_or_null(Y *Val) {
// be used to test for a type as well as cast if successful. This should be
// used in the context of an if statement like this:
//
-// if (const Instruction *I = dyn_cast<const Instruction>(myVal)) { ... }
+// if (const Instruction *I = dyn_cast<Instruction>(myVal)) { ... }
//
template <class X, class Y>
@@ -219,8 +219,8 @@ inline typename cast_retty<X, Y>::ret_type dyn_cast(Y Val) {
// value is accepted.
//
template <class X, class Y>
-inline typename cast_retty<X, Y*>::ret_type dyn_cast_or_null(Y *Val) {
- return (Val && isa<X>(Val)) ? cast<X, Y*>(Val) : 0;
+inline typename cast_retty<X, Y>::ret_type dyn_cast_or_null(Y Val) {
+ return (Val && isa<X>(Val)) ? cast<X, Y>(Val) : 0;
}