The current API for printing errors/warnings/messages from LLDB commands sometimes
adds newlines behind the messages for the caller. However, this happens unconditionally
so when the caller already specified a trailing newline in the error message (or is trying to print
a generated error message that ends in a newline), LLDB ends up printing both the automatically
added newline and the one that was in the error message string. This leads to all the randomly
appearing new lines in error such as:
(lldb) command a error: 'command alias' requires at least two arguments (lldb) apropos a b error: 'apropos' must be called with exactly one argument. (lldb) why is there an empty line behind the second error?
This code adds a check that only appends the new line if the passed message doesn't already
contain a trailing new line.
Also removes the AppendRawWarning which had only one caller and doesn't serve any
purpose now.
How about rstripping any trailing \n and then always adding one?