aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2006-11-27 10:45:49 +0000
committerBill Wendling <isanbard@gmail.com>2006-11-27 10:45:49 +0000
commiteb7313805b06a9751e382fb70751290f49e334c1 (patch)
tree32fc0f12b968b0e7519bc1e7bf348bdccb6fb9a4 /include/llvm
parent41edad7e4b8872414564dea5fb41fa6194375355 (diff)
downloadexternal_llvm-eb7313805b06a9751e382fb70751290f49e334c1.zip
external_llvm-eb7313805b06a9751e382fb70751290f49e334c1.tar.gz
external_llvm-eb7313805b06a9751e382fb70751290f49e334c1.tar.bz2
Protect against null streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-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 138a070..8048d56 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;
}