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:
41edad7
)
Protect against null streams.
author
Bill Wendling
<isanbard@gmail.com>
Mon, 27 Nov 2006 10:45:49 +0000
(10:45 +0000)
committer
Bill Wendling
<isanbard@gmail.com>
Mon, 27 Nov 2006 10:45:49 +0000
(10:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31937
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/Streams.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/Streams.h
b/include/llvm/Support/Streams.h
index 138a07014975aba4b0e88ed761c017e6216f164b..8048d56e7065daa27c541b85475392a404261b04 100644
(file)
--- a/
include/llvm/Support/Streams.h
+++ b/
include/llvm/Support/Streams.h
@@
-32,7
+32,7
@@
namespace llvm {
std::ostream* stream() const { return Stream; }
inline llvm_ostream &operator << (std::ostream& (*Func)(std::ostream&)) {
std::ostream* stream() const { return Stream; }
inline llvm_ostream &operator << (std::ostream& (*Func)(std::ostream&)) {
- *Stream << Func;
+
if (Stream)
*Stream << Func;
return *this;
}
return *this;
}