forked from OSchip/llvm-project
Caught two cases where we were passing a Stream* without checking for NULL
llvm-svn: 167342
This commit is contained in:
parent
5852e3b800
commit
80fcdd429f
|
@ -279,9 +279,12 @@ ConstString::Compare (const ConstString& lhs, const ConstString& rhs)
|
|||
void
|
||||
ConstString::Dump(Stream *s, const char *fail_value) const
|
||||
{
|
||||
const char *cstr = AsCString (fail_value);
|
||||
if (cstr)
|
||||
s->PutCString (cstr);
|
||||
if (s)
|
||||
{
|
||||
const char *cstr = AsCString (fail_value);
|
||||
if (cstr)
|
||||
s->PutCString (cstr);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -524,10 +524,13 @@ FileSpec::Equal (const FileSpec& a, const FileSpec& b, bool full)
|
|||
void
|
||||
FileSpec::Dump(Stream *s) const
|
||||
{
|
||||
m_directory.Dump(s);
|
||||
if (m_directory)
|
||||
s->PutChar('/');
|
||||
m_filename.Dump(s);
|
||||
if (s)
|
||||
{
|
||||
m_directory.Dump(s);
|
||||
if (m_directory)
|
||||
s->PutChar('/');
|
||||
m_filename.Dump(s);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue