From f42f70bfa113a7a4572749b9941e10584dedeacf Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 5 Mar 2010 00:49:08 +0000 Subject: [PATCH] add an assertion requested on llvmdev. llvm-svn: 97769 --- lib/Support/raw_ostream.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp index 25c3fbdef32..071c924d919 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!");