summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-04-16 07:48:11 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-04-16 07:48:11 +0000
commit376230c9ef174236ca83bdc312abb9462f8fd594 (patch)
tree105149129a2aeaa5026e977f635eae065d5d091c /lldb/source/Core/Module.cpp
parent6547d5145818d27ec9199fce5af225e4a992f52d (diff)
downloadbcm5719-llvm-376230c9ef174236ca83bdc312abb9462f8fd594.tar.gz
bcm5719-llvm-376230c9ef174236ca83bdc312abb9462f8fd594.zip
Correctly check if a warning message lacks a trailing new line
Summary: Fixes LLVM bug 41489. Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60653 llvm-svn: 358477
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r--lldb/source/Core/Module.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index e9d9c5e7c5a..9e7be79a364 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -1120,7 +1120,7 @@ void Module::ReportError(const char *format, ...) {
const int format_len = strlen(format);
if (format_len > 0) {
const char last_char = format[format_len - 1];
- if (last_char != '\n' || last_char != '\r')
+ if (last_char != '\n' && last_char != '\r')
strm.EOL();
}
Host::SystemLog(Host::eSystemLogError, "%s", strm.GetData());
@@ -1152,7 +1152,7 @@ void Module::ReportErrorIfModifyDetected(const char *format, ...) {
const int format_len = strlen(format);
if (format_len > 0) {
const char last_char = format[format_len - 1];
- if (last_char != '\n' || last_char != '\r')
+ if (last_char != '\n' && last_char != '\r')
strm.EOL();
}
strm.PutCString("The debug session should be aborted as the original "
@@ -1178,7 +1178,7 @@ void Module::ReportWarning(const char *format, ...) {
const int format_len = strlen(format);
if (format_len > 0) {
const char last_char = format[format_len - 1];
- if (last_char != '\n' || last_char != '\r')
+ if (last_char != '\n' && last_char != '\r')
strm.EOL();
}
Host::SystemLog(Host::eSystemLogWarning, "%s", strm.GetData());
OpenPOWER on IntegriCloud