[all-commits] [llvm/llvm-project] 983ed1: [lldb] Set return object failed status even if err...

David Spickett via All-commits all-commits at lists.llvm.org
Thu Jun 17 04:21:05 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 983ed1b58ef9d0f97c9cec2876f631e47609d437
      https://github.com/llvm/llvm-project/commit/983ed1b58ef9d0f97c9cec2876f631e47609d437
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2021-06-17 (Thu, 17 Jun 2021)

  Changed paths:
    M lldb/source/Interpreter/CommandReturnObject.cpp

  Log Message:
  -----------
  [lldb] Set return object failed status even if error string is empty

The idea is now that AppendError<...> will set eReturnStatusFailed
for you so you don't have to call SetStatus again.

Previously if the error message was empty, the status wouldn't
be set.

I don't think there are any sitautions where the message is in
fact empty but it potentially could be depending on where
we get the string from.

So let's set the status up front then return early if the message is empty.

Reviewed By: teemperor

Differential Revision: https://reviews.llvm.org/D104380




More information about the All-commits mailing list