diff options
-rw-r--r-- | lld/Common/ErrorHandler.cpp | 3 | ||||
-rw-r--r-- | lld/test/COFF/libpath.test | 4 | ||||
-rw-r--r-- | lld/test/COFF/msvclto-archive.ll | 6 | ||||
-rw-r--r-- | lld/test/COFF/msvclto-order.ll | 2 | ||||
-rw-r--r-- | lld/test/COFF/msvclto.ll | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf-absolute.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf-comdat.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf-i386.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf-merge-sec.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf-merge.s | 6 | ||||
-rw-r--r-- | lld/test/ELF/icf-non-mergeable.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf-none.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf1.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf2.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf3.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf4.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf5.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf6.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf7.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/icf9.s | 2 |
20 files changed, 25 insertions, 26 deletions
diff --git a/lld/Common/ErrorHandler.cpp b/lld/Common/ErrorHandler.cpp index cd9f38c4a29..18affce4d5a 100644 --- a/lld/Common/ErrorHandler.cpp +++ b/lld/Common/ErrorHandler.cpp @@ -73,8 +73,7 @@ void ErrorHandler::print(StringRef S, raw_ostream::Colors C) { void ErrorHandler::log(const Twine &Msg) { if (Verbose) { std::lock_guard<std::mutex> Lock(Mu); - outs() << LogName << ": " << Msg << "\n"; - outs().flush(); + *ErrorOS << LogName << ": " << Msg << "\n"; } } diff --git a/lld/test/COFF/libpath.test b/lld/test/COFF/libpath.test index da465bc556b..1e1ce0908e8 100644 --- a/lld/test/COFF/libpath.test +++ b/lld/test/COFF/libpath.test @@ -5,14 +5,14 @@ # RUN: env LIB=%t/a lld-link /out:%t.exe /entry:main /verbose \ # RUN: std64.lib /subsystem:console %p/Inputs/hello64.obj \ -# RUN: /libpath:%t/b /libpath:%t/c > %t.log +# RUN: /libpath:%t/b /libpath:%t/c 2> %t.log # RUN: FileCheck -check-prefix=CHECK1 %s < %t.log CHECK1: b{{[/\\]}}std64.lib # RUN: lld-link /out:%t.exe /entry:main /verbose \ # RUN: std64.lib /subsystem:console %p/Inputs/hello64.obj \ -# RUN: /libpath:%t/a /libpath:%t/b /libpath:%t/c > %t.log +# RUN: /libpath:%t/a /libpath:%t/b /libpath:%t/c 2> %t.log # RUN: FileCheck -check-prefix=CHECK2 %s < %t.log CHECK2: a{{[/\\]}}std64.lib diff --git a/lld/test/COFF/msvclto-archive.ll b/lld/test/COFF/msvclto-archive.ll index 334565a1bef..f0953272102 100644 --- a/lld/test/COFF/msvclto-archive.ll +++ b/lld/test/COFF/msvclto-archive.ll @@ -9,14 +9,14 @@ ; RUN: mkdir -p %t.dir ; RUN: llvm-mc -triple=x86_64-pc-windows-msvc -filetype=obj -o %t.dir/bitcode.obj %p/Inputs/msvclto.s ; RUN: lld-link %t-main1.a %t.dir/bitcode.obj /msvclto /out:%t.exe /opt:lldlto=1 /opt:icf \ -; RUN: /entry:main /verbose > %t.log || true +; RUN: /entry:main /verbose 2> %t.log || true ; RUN: FileCheck -check-prefix=BC %s < %t.log ; BC-NOT: Creating a temporary archive for ; RUN: rm -f %t-main2.a ; RUN: llvm-ar cru %t-main2.a %t.dir/bitcode.obj ; RUN: lld-link %t.obj %t-main2.a /msvclto /out:%t.exe /opt:lldlto=1 /opt:icf \ -; RUN: /entry:main /verbose > %t.log || true +; RUN: /entry:main /verbose 2> %t.log || true ; RUN: FileCheck -check-prefix=OBJ %s < %t.log ; OBJ-NOT: Creating a temporary archive @@ -25,7 +25,7 @@ ; RUN: rm -f %t-main3.a ; RUN: llvm-ar cruT %t-main3.a %t.dir/bitcode.obj ; RUN: lld-link %t.obj %t-main3.a /msvclto /out:%t.exe /opt:lldlto=1 /opt:icf \ -; RUN: /entry:main /verbose > %t.log || true +; RUN: /entry:main /verbose 2> %t.log || true ; RUN: FileCheck -check-prefix=THIN %s < %t.log ; THIN: Creating a temporary archive diff --git a/lld/test/COFF/msvclto-order.ll b/lld/test/COFF/msvclto-order.ll index 6f569af4af0..1758077fe74 100644 --- a/lld/test/COFF/msvclto-order.ll +++ b/lld/test/COFF/msvclto-order.ll @@ -5,7 +5,7 @@ ; RUN: llc -filetype=obj %S/Inputs/msvclto-order-b.ll -o %T/msvclto-order-b.obj ; RUN: llvm-ar crs %T/msvclto-order-b.lib %T/msvclto-order-b.obj ; RUN: lld-link /verbose /msvclto /out:%t.exe /entry:main %t.obj \ -; RUN: %T/msvclto-order-a.lib %T/msvclto-order-b.lib > %t.log || true +; RUN: %T/msvclto-order-a.lib %T/msvclto-order-b.lib 2> %t.log || true ; RUN: FileCheck %s < %t.log ; CHECK: : link.exe diff --git a/lld/test/COFF/msvclto.ll b/lld/test/COFF/msvclto.ll index 66fabeb80c7..b29982737f1 100644 --- a/lld/test/COFF/msvclto.ll +++ b/lld/test/COFF/msvclto.ll @@ -3,7 +3,7 @@ ; RUN: mkdir -p %t.dir ; RUN: llvm-mc -triple=x86_64-pc-windows-msvc -filetype=obj -o %t.dir/bitcode.obj %p/Inputs/msvclto.s ; RUN: lld-link %t.obj %t.dir/bitcode.obj /msvclto /out:%t.exe /opt:lldlto=1 /opt:icf \ -; RUN: /entry:main /verbose > %t.log || true +; RUN: /entry:main /verbose 2> %t.log || true ; RUN: FileCheck %s < %t.log ; CHECK: /opt:icf /entry:main diff --git a/lld/test/ELF/icf-absolute.s b/lld/test/ELF/icf-absolute.s index 601322477da..09f6790907a 100644 --- a/lld/test/ELF/icf-absolute.s +++ b/lld/test/ELF/icf-absolute.s @@ -2,7 +2,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/icf-absolute.s -o %t2 -# RUN: ld.lld %t %t2 -o %t3 --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t %t2 -o %t3 --icf=all --verbose 2>&1 | FileCheck %s # CHECK: selected .text.f1 # CHECK: removed .text.f2 diff --git a/lld/test/ELF/icf-comdat.s b/lld/test/ELF/icf-comdat.s index 28c0a586bf0..aab6a00f484 100644 --- a/lld/test/ELF/icf-comdat.s +++ b/lld/test/ELF/icf-comdat.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t -# RUN: ld.lld %t -o %t2 --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t -o %t2 --icf=all --verbose 2>&1 | FileCheck %s # CHECK: selected .text.f1 # CHECK: removed .text.f2 diff --git a/lld/test/ELF/icf-i386.s b/lld/test/ELF/icf-i386.s index 292883e16fe..b01e0503d40 100644 --- a/lld/test/ELF/icf-i386.s +++ b/lld/test/ELF/icf-i386.s @@ -2,7 +2,7 @@ # This test is to make sure that we can handle implicit addends properly. # RUN: llvm-mc -filetype=obj -triple=i386-unknown-linux %s -o %t -# RUN: ld.lld %t -o %t2 --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t -o %t2 --icf=all --verbose 2>&1 | FileCheck %s # CHECK: selected .text.f1 # CHECK: removed .text.f2 diff --git a/lld/test/ELF/icf-merge-sec.s b/lld/test/ELF/icf-merge-sec.s index 39f6a884fa9..1e866a0caa4 100644 --- a/lld/test/ELF/icf-merge-sec.s +++ b/lld/test/ELF/icf-merge-sec.s @@ -2,7 +2,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/icf-merge-sec.s -o %t2 -# RUN: ld.lld %t %t2 -o %t3 --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t %t2 -o %t3 --icf=all --verbose 2>&1 | FileCheck %s # CHECK: selected .text.f1 # CHECK: removed .text.f2 diff --git a/lld/test/ELF/icf-merge.s b/lld/test/ELF/icf-merge.s index 938b749da6b..06e852fe9dd 100644 --- a/lld/test/ELF/icf-merge.s +++ b/lld/test/ELF/icf-merge.s @@ -2,13 +2,13 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/icf-merge.s -o %t1 -# RUN: ld.lld %t %t1 -o %t1.out --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t %t1 -o %t1.out --icf=all --verbose 2>&1 | FileCheck %s # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/icf-merge2.s -o %t2 -# RUN: ld.lld %t %t2 -o %t3.out --icf=all --verbose | FileCheck --check-prefix=NOMERGE %s +# RUN: ld.lld %t %t2 -o %t3.out --icf=all --verbose 2>&1 | FileCheck --check-prefix=NOMERGE %s # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/icf-merge3.s -o %t3 -# RUN: ld.lld %t %t3 -o %t3.out --icf=all --verbose | FileCheck --check-prefix=NOMERGE %s +# RUN: ld.lld %t %t3 -o %t3.out --icf=all --verbose 2>&1 | FileCheck --check-prefix=NOMERGE %s # CHECK: selected .text.f1 # CHECK: removed .text.f2 diff --git a/lld/test/ELF/icf-non-mergeable.s b/lld/test/ELF/icf-non-mergeable.s index 3cb5a0484f2..48ba2008cac 100644 --- a/lld/test/ELF/icf-non-mergeable.s +++ b/lld/test/ELF/icf-non-mergeable.s @@ -8,7 +8,7 @@ // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \ // RUN: %p/Inputs/icf-non-mergeable.s -o %t2 -// RUN: ld.lld %t1 %t2 -o %t3 --icf=all --verbose | FileCheck %s +// RUN: ld.lld %t1 %t2 -o %t3 --icf=all --verbose 2>&1 | FileCheck %s // CHECK-NOT: selected .text.f1 // CHECK-NOT: removed .text.f2 diff --git a/lld/test/ELF/icf-none.s b/lld/test/ELF/icf-none.s index 671f2085f66..9ec1406de8a 100644 --- a/lld/test/ELF/icf-none.s +++ b/lld/test/ELF/icf-none.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t -# RUN: ld.lld %t -o %t2 --icf=all --icf=none --verbose | FileCheck %s +# RUN: ld.lld %t -o %t2 --icf=all --icf=none --verbose 2>&1 | FileCheck %s # CHECK-NOT: selected .text.f1 diff --git a/lld/test/ELF/icf1.s b/lld/test/ELF/icf1.s index bb060078476..e2562b5a83e 100644 --- a/lld/test/ELF/icf1.s +++ b/lld/test/ELF/icf1.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t -# RUN: ld.lld %t -o %t2 --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t -o %t2 --icf=all --verbose 2>&1 | FileCheck %s # CHECK: selected .text.f1 # CHECK: removed .text.f2 diff --git a/lld/test/ELF/icf2.s b/lld/test/ELF/icf2.s index be595112b7e..fd0a311cbd1 100644 --- a/lld/test/ELF/icf2.s +++ b/lld/test/ELF/icf2.s @@ -2,7 +2,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/icf2.s -o %t2 -# RUN: ld.lld %t1 %t2 -o %t --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t1 %t2 -o %t --icf=all --verbose 2>&1 | FileCheck %s # CHECK: selected .text.f1 # CHECK: removed .text.f2 diff --git a/lld/test/ELF/icf3.s b/lld/test/ELF/icf3.s index 9f39ff6c747..40067cefb20 100644 --- a/lld/test/ELF/icf3.s +++ b/lld/test/ELF/icf3.s @@ -2,7 +2,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/icf2.s -o %t2 -# RUN: ld.lld %t1 %t2 -o %t --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t1 %t2 -o %t --icf=all --verbose 2>&1 | FileCheck %s # CHECK-NOT: Selected .text.f1 # CHECK-NOT: Selected .text.f2 diff --git a/lld/test/ELF/icf4.s b/lld/test/ELF/icf4.s index 08830c8e503..b7f40e80573 100644 --- a/lld/test/ELF/icf4.s +++ b/lld/test/ELF/icf4.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t -# RUN: ld.lld %t -o %t2 --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t -o %t2 --icf=all --verbose 2>&1 | FileCheck %s # CHECK-NOT: Selected .text.f1 # CHECK-NOT: Selected .text.f2 diff --git a/lld/test/ELF/icf5.s b/lld/test/ELF/icf5.s index 952fe3601a4..749cc5e923a 100644 --- a/lld/test/ELF/icf5.s +++ b/lld/test/ELF/icf5.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t -# RUN: ld.lld %t -o %t2 --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t -o %t2 --icf=all --verbose 2>&1 | FileCheck %s # CHECK-NOT: Selected .text.f1 # CHECK-NOT: Selected .text.f2 diff --git a/lld/test/ELF/icf6.s b/lld/test/ELF/icf6.s index ecb62fee2a0..6420868523b 100644 --- a/lld/test/ELF/icf6.s +++ b/lld/test/ELF/icf6.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t -# RUN: ld.lld %t -o %t2 --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t -o %t2 --icf=all --verbose 2>&1 | FileCheck %s # CHECK-NOT: Selected .text.f1 # CHECK-NOT: Selected .text.f2 diff --git a/lld/test/ELF/icf7.s b/lld/test/ELF/icf7.s index 8504ca2ac61..00fca793aee 100644 --- a/lld/test/ELF/icf7.s +++ b/lld/test/ELF/icf7.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t -# RUN: ld.lld %t -o %t2 --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t -o %t2 --icf=all --verbose 2>&1 | FileCheck %s # RUN: llvm-objdump -t %t2 | FileCheck -check-prefix=ALIGN %s # CHECK: selected .text.f1 diff --git a/lld/test/ELF/icf9.s b/lld/test/ELF/icf9.s index 7d33f87d57a..5da9bd17237 100644 --- a/lld/test/ELF/icf9.s +++ b/lld/test/ELF/icf9.s @@ -2,7 +2,7 @@ ### Make sure that we do not merge data. # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t -# RUN: ld.lld %t -o %t2 --icf=all --verbose | FileCheck %s +# RUN: ld.lld %t -o %t2 --icf=all --verbose 2>&1 | FileCheck %s # RUN: llvm-readelf -S -W %t2 | FileCheck --check-prefix=SEC %s # SEC: .rodata PROGBITS 0000000000200120 000120 000002 00 A 0 0 1 |