projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d299ab1
)
restrict dyn_cast_or_null to pointer types, just like cast_or_null; re-commit of...
author
Gabor Greif
<ggreif@gmail.com>
Sat, 18 Sep 2010 13:03:32 +0000
(13:03 +0000)
committer
Gabor Greif
<ggreif@gmail.com>
Sat, 18 Sep 2010 13:03:32 +0000
(13:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114282
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/Casting.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/Casting.h
b/include/llvm/Support/Casting.h
index c589171bbafe67e00cbb950a1b660e576f9b5444..6bb98064382e3f06a0cb219f9d124cd2d5830919 100644
(file)
--- a/
include/llvm/Support/Casting.h
+++ b/
include/llvm/Support/Casting.h
@@
-232,8
+232,8
@@
inline typename cast_retty<X, Y>::ret_type dyn_cast(const Y &Val) {
// value is accepted.
//
template <class X, class Y>
-inline typename cast_retty<X, Y
>::ret_type dyn_cast_or_null(const 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>(Val) : 0;
}
} // End llvm namespace