projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use setStream infomatted_raw_ostream's constructor, to reduce code
[oota-llvm.git]
/
include
/
llvm
/
Support
/
Casting.h
diff --git
a/include/llvm/Support/Casting.h
b/include/llvm/Support/Casting.h
index 3a68817ce997264646f5a57206575fc2b3063eda..48988f8a6bb8354c71326e634364acbb2895b4b2 100644
(file)
--- a/
include/llvm/Support/Casting.h
+++ b/
include/llvm/Support/Casting.h
@@
-221,7
+221,7
@@
inline typename cast_retty<X, Y*>::ret_type cast_or_null(Y *Val) {
//
template <class X, class Y>
//
template <class X, class Y>
-inline typename cast_retty<X, Y>::ret_type dyn_cast(
Y
Val) {
+inline typename cast_retty<X, Y>::ret_type dyn_cast(
const Y &
Val) {
return isa<X>(Val) ? cast<X, Y>(Val) : 0;
}
return isa<X>(Val) ? cast<X, Y>(Val) : 0;
}
@@
-229,13
+229,13
@@
inline typename cast_retty<X, Y>::ret_type dyn_cast(Y Val) {
// value is accepted.
//
template <class X, class Y>
// value is accepted.
//
template <class X, class Y>
-inline typename cast_retty<X, Y>::ret_type dyn_cast_or_null(
Y
Val) {
+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;
}
#ifdef DEBUG_CAST_OPERATORS
return (Val && isa<X>(Val)) ? cast<X, Y>(Val) : 0;
}
#ifdef DEBUG_CAST_OPERATORS
-#include "llvm/Support/
Debug
.h"
+#include "llvm/Support/
Streams
.h"
struct bar {
bar() {}
struct bar {
bar() {}