aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CommandFlags.cpp
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2021-06-04 16:57:13 +0100
committerDavid Spickett <david.spickett@linaro.org>2021-06-08 09:41:07 +0100
commite05b03cf4f45ac5ee63c59a3464e7d484884645c (patch)
tree25a1a2d8bec77173a21a2ef553811dd0b1d89ede /llvm/lib/CodeGen/CommandFlags.cpp
parentf9a79356f223035ccf0b4d0666f8779061eddc61 (diff)
downloadllvm-e05b03cf4f45ac5ee63c59a3464e7d484884645c.zip
llvm-e05b03cf4f45ac5ee63c59a3464e7d484884645c.tar.gz
llvm-e05b03cf4f45ac5ee63c59a3464e7d484884645c.tar.bz2
[lldb] Set return status to failed when adding a command error
There is a common pattern: result.AppendError(...); result.SetStatus(eReturnStatusFailed); I found that some commands don't actually "fail" but only print "error: ..." because the second line got missed. This can cause you to miss a failed command when you're using the Python interface during testing. (and produce some confusing script results) I did not find any place where you would want to add an error without setting the return status, so just set eReturnStatusFailed whenever you add an error to a command result. This change does not remove any of the now redundant SetStatus. This should allow us to see if there are any tests that have commands unexpectedly fail with this change. (the test suite passes for me but I don't have access to all the systems we cover so there could be some corner cases) Some tests that failed on x86 and AArch64 have been modified to work with the new behaviour. Differential Revision: https://reviews.llvm.org/D103701
Diffstat (limited to 'llvm/lib/CodeGen/CommandFlags.cpp')
0 files changed, 0 insertions, 0 deletions