summaryrefslogtreecommitdiff
path: root/lib/Support/raw_ostream.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-05 00:49:08 +0000
committerChris Lattner <sabre@nondot.org>2010-03-05 00:49:08 +0000
commitf071d4efeb28eb13b59af4f6e3ed0f8e40c52551 (patch)
treed7b739e4437511b6e09e5a5464353263f23a4825 /lib/Support/raw_ostream.cpp
parent18ce64e069211c0da39351d7f436c6a431bca2b7 (diff)
downloadllvm-f071d4efeb28eb13b59af4f6e3ed0f8e40c52551.tar.gz
llvm-f071d4efeb28eb13b59af4f6e3ed0f8e40c52551.tar.bz2
llvm-f071d4efeb28eb13b59af4f6e3ed0f8e40c52551.tar.xz
add an assertion requested on llvmdev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/raw_ostream.cpp')
-rw-r--r--lib/Support/raw_ostream.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp
index 25c3fbdef3..071c924d91 100644
--- a/lib/Support/raw_ostream.cpp
+++ b/lib/Support/raw_ostream.cpp
@@ -368,6 +368,7 @@ void format_object_base::home() {
/// if no error occurred.
raw_fd_ostream::raw_fd_ostream(const char *Filename, std::string &ErrorInfo,
unsigned Flags) : pos(0) {
+ assert(Filename != 0 && "Filename is null");
// Verify that we don't have both "append" and "excl".
assert((!(Flags & F_Excl) || !(Flags & F_Append)) &&
"Cannot specify both 'excl' and 'append' file creation flags!");