From 72ef113d40ef57d9dd4cf7ba6819e2048df99fc6 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 14 Aug 2019 08:11:20 +0000 Subject: [API] Have SBCommandReturnObject::GetOutput/Error return "" instead of nullptr Summary: It seems this was an unintended side-effect of D26698. AFAICT, these functions did return an empty string before that patch, and the patch contained code which attempted to ensure that, but those efforts were negated by ConstString::AsCString, which by default returns a nullptr even for empty strings. This patch: - fixes the GetOutput/Error methods to really return empty strings - adds and explicit test for that - removes a workaround in lldbtest.py, which was masking this problem from our other tests Reviewers: jingham, clayborg Subscribers: zturner, lldb-commits Differential Revision: https://reviews.llvm.org/D65739 llvm-svn: 368806 --- lldb/packages/Python/lldbsuite/test/lldbtest.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py') diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index adbd0ec369b..dd4651c9eff 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -2318,8 +2318,6 @@ FileCheck output: with recording(self, trace) as sbuf: print("looking at:", output, file=sbuf) - if output is None: - output = "" # The heading says either "Expecting" or "Not expecting". heading = "Expecting" if matching else "Not expecting" -- cgit v1.2.3