Fix a problem where the StringPrinter could be mistaking an empty string for a read error, and reporting spurious 'unable to read data' messages. rdar://19007243

llvm-svn: 222190
This commit is contained in:
Enrico Granata
2014-11-17 23:14:11 +00:00
parent 6cd8e0c9b0
commit 099263b487
3 changed files with 5 additions and 1 deletions

View File

@@ -566,7 +566,7 @@ ReadUTFBufferAndDumpToStream (const ReadStringAndDumpToStreamOptions& options,
else
data_read = process_sp->ReadMemoryFromInferior(options.GetLocation(), (char*)buffer_sp->GetBytes(), bufferSPSize, error);
if (error.Fail() || data_read == 0)
if (error.Fail())
{
options.GetStream()->Printf("unable to read data");
return true;