[llvm-commits] CVS: llvm/include/llvm/Support/Streams.h
Bill Wendling
isanbard at gmail.com
Mon Nov 27 02:46:04 PST 2006
Changes in directory llvm/include/llvm/Support:
Streams.h updated: 1.2 -> 1.3
---
Log message:
Protect against null streams.
---
Diffs of the changes: (+1 -1)
Streams.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/include/llvm/Support/Streams.h
diff -u llvm/include/llvm/Support/Streams.h:1.2 llvm/include/llvm/Support/Streams.h:1.3
--- llvm/include/llvm/Support/Streams.h:1.2 Sun Nov 26 04:51:51 2006
+++ llvm/include/llvm/Support/Streams.h Mon Nov 27 04:45:49 2006
@@ -32,7 +32,7 @@
std::ostream* stream() const { return Stream; }
inline llvm_ostream &operator << (std::ostream& (*Func)(std::ostream&)) {
- *Stream << Func;
+ if (Stream) *Stream << Func;
return *this;
}
More information about the llvm-commits
mailing list