summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/test/tools/llvm-objcopy/ELF/same-file-strip.test7
-rw-r--r--llvm/tools/llvm-objcopy/llvm-objcopy.cpp2
2 files changed, 5 insertions, 4 deletions
diff --git a/llvm/test/tools/llvm-objcopy/ELF/same-file-strip.test b/llvm/test/tools/llvm-objcopy/ELF/same-file-strip.test
index 304ecaf0e1f..9381e8f0ccc 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/same-file-strip.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/same-file-strip.test
@@ -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
FileHeader:
diff --git a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
index e9372176e43..9c0145ffee5 100644
--- a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
+++ b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
@@ -84,7 +84,7 @@ LLVM_ATTRIBUTE_NORETURN void reportError(StringRef File, Error E) {
ErrorSuccess reportWarning(Error E) {
assert(E);
- WithColor::warning(errs(), ToolName) << toString(std::move(E));
+ WithColor::warning(errs(), ToolName) << toString(std::move(E)) << '\n';
return Error::success();
}
OpenPOWER on IntegriCloud