aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Support/Streams.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Support/Streams.h b/include/llvm/Support/Streams.h
index 138a070149..8048d56e70 100644
--- 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&)) {
- *Stream << Func;
+ if (Stream) *Stream << Func;
return *this;
}