forked from OSchip/llvm-project
Don't add a newline if the object description already has one.
<rdar://problem/25755431> llvm-svn: 299147
This commit is contained in:
parent
b7b6c907ba
commit
b9923589aa
|
@ -457,7 +457,12 @@ bool ValueObjectPrinter::PrintObjectDescriptionIfNeeded(bool value_printed,
|
|||
else
|
||||
object_desc = GetDescriptionForDisplay();
|
||||
if (object_desc && *object_desc) {
|
||||
m_stream->Printf("%s\n", object_desc);
|
||||
// If the description already ends with a \n don't add another one.
|
||||
size_t object_end = strlen(object_desc) - 1;
|
||||
if (object_desc[object_end] == '\n')
|
||||
m_stream->Printf("%s", object_desc);
|
||||
else
|
||||
m_stream->Printf("%s\n", object_desc);
|
||||
return true;
|
||||
} else if (value_printed == false && summary_printed == false)
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue