Skip to content
Browse files

[llvm-objcopy] Append '\n' to warning messages

Currently the warning message of `llvm-strip %t.o %t.o` does not include
the trailing newline. Fix this by appending a '\n'.

This is the only warning llvm-objcopy and llvm-strip can issue.

Reviewed By: jhenderson

Differential Revision:

llvm-svn: 369391
  • Loading branch information
MaskRay committed Aug 20, 2019
1 parent a90ee0e commit ebd50291e8cf5911eb9c2da54389d93312caadd2
@@ -9,10 +9,11 @@

# ERR: error: cannot specify '-' as an input file more than once

# RUN: llvm-strip %t %t 2>&1 | FileCheck -check-prefix=WARN %s -DFILE=%t
# RUN: llvm-strip %t %t %t 2>&1 | FileCheck -check-prefix=WARN %s -DFILE=%t
# RUN: cp %t %t2
# RUN: llvm-strip %t %t %t %t2 %t2 2>&1 | FileCheck -check-prefix=WARN %s -DFILE=%t -DFILE2=%t2

# WARN: warning: '[[FILE]]' was already specified
# WARN: warning: '[[FILE]]' was already specified
# WARN-NEXT: warning: '[[FILE2]]' was already specified

--- !ELF
@@ -84,7 +84,7 @@ LLVM_ATTRIBUTE_NORETURN void reportError(StringRef File, Error E) {

ErrorSuccess reportWarning(Error E) {
WithColor::warning(errs(), ToolName) << toString(std::move(E));
WithColor::warning(errs(), ToolName) << toString(std::move(E)) << '\n';
return Error::success();

0 comments on commit ebd5029

Please sign in to comment.
You can’t perform that action at this time.