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
|
@ -278,11 +278,14 @@ ConstString::Compare (const ConstString& lhs, const ConstString& rhs)
|
|||
|
||||
void
|
||||
ConstString::Dump(Stream *s, const char *fail_value) const
|
||||
{
|
||||
if (s)
|
||||
{
|
||||
const char *cstr = AsCString (fail_value);
|
||||
if (cstr)
|
||||
s->PutCString (cstr);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ConstString::DumpDebug(Stream *s) const
|
||||
|
|
|
@ -523,12 +523,15 @@ FileSpec::Equal (const FileSpec& a, const FileSpec& b, bool full)
|
|||
//------------------------------------------------------------------
|
||||
void
|
||||
FileSpec::Dump(Stream *s) const
|
||||
{
|
||||
if (s)
|
||||
{
|
||||
m_directory.Dump(s);
|
||||
if (m_directory)
|
||||
s->PutChar('/');
|
||||
m_filename.Dump(s);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// Returns true if the file exists.
|
||||
|
|
Loading…
Reference in New Issue