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,6 +457,11 @@ bool ValueObjectPrinter::PrintObjectDescriptionIfNeeded(bool value_printed,
|
||||||
else
|
else
|
||||||
object_desc = GetDescriptionForDisplay();
|
object_desc = GetDescriptionForDisplay();
|
||||||
if (object_desc && *object_desc) {
|
if (object_desc && *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);
|
m_stream->Printf("%s\n", object_desc);
|
||||||
return true;
|
return true;
|
||||||
} else if (value_printed == false && summary_printed == false)
|
} else if (value_printed == false && summary_printed == false)
|
||||||
|
|
Loading…
Reference in New Issue