[lld] b587ca9 - [test] Replace `yaml2obj >` with `yaml2obj -o` and remove unneeded input redirection

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 15:01:22 PDT 2020


Author: Fangrui Song
Date: 2020-08-20T15:01:09-07:00
New Revision: b587ca93be114d07ec3bf654add97d7872325281

URL: https://github.com/llvm/llvm-project/commit/b587ca93be114d07ec3bf654add97d7872325281
DIFF: https://github.com/llvm/llvm-project/commit/b587ca93be114d07ec3bf654add97d7872325281.diff

LOG: [test] Replace `yaml2obj >` with `yaml2obj -o` and remove unneeded input redirection

Added: 
    

Modified: 
    lld/test/COFF/align.s
    lld/test/COFF/allow-unknown-debug-info.test
    lld/test/COFF/alternatename.test
    lld/test/COFF/ar-comdat.test
    lld/test/COFF/arm64-delayimport.yaml
    lld/test/COFF/arm64-import2.test
    lld/test/COFF/arm64-magic.yaml
    lld/test/COFF/arm64-relocs-imports.test
    lld/test/COFF/armnt-blx23t.test
    lld/test/COFF/armnt-branch24t.test
    lld/test/COFF/armnt-dynamicbase.test
    lld/test/COFF/armnt-entry-point.test
    lld/test/COFF/armnt-imports.test
    lld/test/COFF/armnt-mov32t-exec.test
    lld/test/COFF/armnt-movt32t.test
    lld/test/COFF/armnt-rel32.yaml
    lld/test/COFF/associative-comdat-empty.test
    lld/test/COFF/base.test
    lld/test/COFF/baserel.test
    lld/test/COFF/broken-arm-reloc.yaml
    lld/test/COFF/combined-resources.test
    lld/test/COFF/common-alignment.test
    lld/test/COFF/common.test
    lld/test/COFF/conflict-mangled.test
    lld/test/COFF/conflict.test
    lld/test/COFF/crt-chars.test
    lld/test/COFF/crt-dyn-initializer-order.test
    lld/test/COFF/debug-fastlink.test
    lld/test/COFF/debug.test
    lld/test/COFF/def-name.test
    lld/test/COFF/default-alignment.test
    lld/test/COFF/defparser.test
    lld/test/COFF/delayimports-armnt.yaml
    lld/test/COFF/delayimports-error.test
    lld/test/COFF/delayimports32.test
    lld/test/COFF/delayimporttables.yaml
    lld/test/COFF/dll.test
    lld/test/COFF/dllimport-gc.test
    lld/test/COFF/driver-opt.s
    lld/test/COFF/driver.test
    lld/test/COFF/entry-drectve.test
    lld/test/COFF/entry-inference2.test
    lld/test/COFF/entry-inference32.test
    lld/test/COFF/entry-mangled.test
    lld/test/COFF/exclude-all.s
    lld/test/COFF/export-all.s
    lld/test/COFF/export-arm64.yaml
    lld/test/COFF/export-armnt.yaml
    lld/test/COFF/export.test
    lld/test/COFF/export32.test
    lld/test/COFF/filealign.test
    lld/test/COFF/filetype.test
    lld/test/COFF/fixed.test
    lld/test/COFF/force-multiple.test
    lld/test/COFF/force.test
    lld/test/COFF/guardcf-align.s
    lld/test/COFF/guardcf-thunk.s
    lld/test/COFF/guardcf.test
    lld/test/COFF/heap.test
    lld/test/COFF/hello32.test
    lld/test/COFF/icf-associative.test
    lld/test/COFF/icf-circular.test
    lld/test/COFF/icf-circular2.test
    lld/test/COFF/icf-data.test
    lld/test/COFF/icf-different-align.test
    lld/test/COFF/icf-local.test
    lld/test/COFF/icf-simple.test
    lld/test/COFF/ignore-many.test
    lld/test/COFF/ignore4217.yaml
    lld/test/COFF/imports-mangle.test
    lld/test/COFF/include.test
    lld/test/COFF/include2.test
    lld/test/COFF/includeoptional.yaml
    lld/test/COFF/includeoptional2.yaml
    lld/test/COFF/incremental.test
    lld/test/COFF/internal.test
    lld/test/COFF/invalid-debug-type.test
    lld/test/COFF/invalid-debug.test
    lld/test/COFF/invalid-obj.test
    lld/test/COFF/invalid-section-number.test
    lld/test/COFF/largeaddressaware.test
    lld/test/COFF/linkrepro-pdb.test
    lld/test/COFF/linkrepro.test
    lld/test/COFF/loadcfg.test
    lld/test/COFF/loadcfg32.test
    lld/test/COFF/locally-imported-arm64.test
    lld/test/COFF/locally-imported.test
    lld/test/COFF/locally-imported32.test
    lld/test/COFF/long-section-name.test
    lld/test/COFF/machine.test
    lld/test/COFF/manifest.test
    lld/test/COFF/manifestinput-error.test
    lld/test/COFF/manifestinput-nowarning.test
    lld/test/COFF/manifestinput.test
    lld/test/COFF/map.test
    lld/test/COFF/merge-resource-manifest.test
    lld/test/COFF/merge.test
    lld/test/COFF/mixed-resource-obj.yaml
    lld/test/COFF/no-ipi-stream.test
    lld/test/COFF/noentry.test
    lld/test/COFF/opt.test
    lld/test/COFF/options.test
    lld/test/COFF/order-i386.test
    lld/test/COFF/order.test
    lld/test/COFF/out.test
    lld/test/COFF/output-chars.test
    lld/test/COFF/pdata-arm64-bad.yaml
    lld/test/COFF/pdata-arm64.yaml
    lld/test/COFF/pdb-exe-path-dots.test
    lld/test/COFF/pdb-file-static.test
    lld/test/COFF/pdb-global-hashes.test
    lld/test/COFF/pdb-globals.test
    lld/test/COFF/pdb-natvis.test
    lld/test/COFF/pdb-none.test
    lld/test/COFF/pdb-options.test
    lld/test/COFF/pdb-procid-remapping.test
    lld/test/COFF/pdb-publics-import.test
    lld/test/COFF/pdb-same-name.test
    lld/test/COFF/pdb-tpi-aligned-records.test
    lld/test/COFF/pdb-tpi-hash-size.test
    lld/test/COFF/pdb.test
    lld/test/COFF/pdbaltpath.test
    lld/test/COFF/pdbstream.test
    lld/test/COFF/pdbstripped.test
    lld/test/COFF/reloc-arm.test
    lld/test/COFF/reloc-x64.test
    lld/test/COFF/reloc-x86.test
    lld/test/COFF/resource.test
    lld/test/COFF/responsefile.test
    lld/test/COFF/rsds.test
    lld/test/COFF/section-order.test
    lld/test/COFF/section.test
    lld/test/COFF/seh-comdat.test
    lld/test/COFF/seh.test
    lld/test/COFF/sort-debug.test
    lld/test/COFF/stack.test
    lld/test/COFF/subsystem-drectve.test
    lld/test/COFF/subsystem-inference2.test
    lld/test/COFF/symtab.test
    lld/test/COFF/timestamp.test
    lld/test/COFF/tls.test
    lld/test/COFF/tls32.test
    lld/test/COFF/unwind.test
    lld/test/COFF/version.test
    lld/test/COFF/weak-external.test
    lld/test/COFF/weak-external2.test
    lld/test/COFF/weak-external3.test
    lld/test/COFF/wholearchive.s
    lldb/test/Shell/Breakpoint/debug_addrx.test
    lldb/test/Shell/Breakpoint/debug_rnglist_basic.test
    lldb/test/Shell/Breakpoint/debug_rnglist_offset_pair.test
    lldb/test/Shell/Breakpoint/debug_rnglist_rlestartend.test
    lldb/test/Shell/Breakpoint/debug_rnglistx_rlex.test
    lldb/test/Shell/Breakpoint/implicit_const_form_support.test
    lldb/test/Shell/Breakpoint/single-file-split-dwarf.test
    lldb/test/Shell/Breakpoint/split-dwarf-5-addrbase.test
    lldb/test/Shell/Breakpoint/split-dwarf5-debug-stroffsets.test
    lldb/test/Shell/Commands/command-disassemble-process.yaml
    lldb/test/Shell/Commands/command-target-modules-dump-sections.yaml
    lldb/test/Shell/Minidump/Windows/arm-fp-unwind.test
    lldb/test/Shell/Minidump/Windows/broken-unwind.test
    lldb/test/Shell/Minidump/Windows/find-module.test
    lldb/test/Shell/Minidump/breakpad-symbols.test
    lldb/test/Shell/Minidump/disassemble-no-module.yaml
    lldb/test/Shell/Minidump/dump-all.test
    lldb/test/Shell/Minidump/fb-dump.test
    lldb/test/Shell/Minidump/memory-region-from-module.yaml
    lldb/test/Shell/Minidump/memory-region.yaml
    lldb/test/Shell/Minidump/no-process-id.yaml
    lldb/test/Shell/ObjectFile/ELF/PT_LOAD-empty.yaml
    lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_INTERP.yaml
    lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml
    lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap.yaml
    lldb/test/Shell/ObjectFile/ELF/PT_LOAD.yaml
    lldb/test/Shell/ObjectFile/ELF/PT_TLS-overlap-PT_LOAD.yaml
    lldb/test/Shell/ObjectFile/ELF/aarch64-relocations.yaml
    lldb/test/Shell/ObjectFile/ELF/avr-basic-info.yaml
    lldb/test/Shell/ObjectFile/ELF/base-address.yaml
    lldb/test/Shell/ObjectFile/ELF/basic-info.yaml
    lldb/test/Shell/ObjectFile/ELF/build-id-case.yaml
    lldb/test/Shell/ObjectFile/ELF/compressed-sections.yaml
    lldb/test/Shell/ObjectFile/ELF/duplicate-section.yaml
    lldb/test/Shell/ObjectFile/ELF/gnu-debuglink.yaml
    lldb/test/Shell/ObjectFile/ELF/minidebuginfo-corrupt-xz.yaml
    lldb/test/Shell/ObjectFile/ELF/minidebuginfo-find-symbols.yaml
    lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml
    lldb/test/Shell/ObjectFile/ELF/netbsd-exec-8.99.30-amd64.yaml
    lldb/test/Shell/ObjectFile/ELF/section-addresses.yaml
    lldb/test/Shell/ObjectFile/ELF/section-overlap.yaml
    lldb/test/Shell/ObjectFile/ELF/section-permissions.yaml
    lldb/test/Shell/ObjectFile/ELF/section-types-edgecases.yaml
    lldb/test/Shell/ObjectFile/ELF/section-types.yaml
    lldb/test/Shell/ObjectFile/ELF/short-build-id.yaml
    lldb/test/Shell/ObjectFile/MachO/lc_build_version.yaml
    lldb/test/Shell/ObjectFile/MachO/lc_build_version_notools.yaml
    lldb/test/Shell/ObjectFile/MachO/lc_version_min.yaml
    lldb/test/Shell/ObjectFile/MachO/subsections.yaml
    lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml
    lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
    lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml
    lldb/test/Shell/ObjectFile/PECOFF/dep-modules.yaml
    lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml
    lldb/test/Shell/ObjectFile/PECOFF/export-dllfunc.yaml
    lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml
    lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml
    lldb/test/Shell/ObjectFile/PECOFF/sections-names.yaml
    lldb/test/Shell/ObjectFile/PECOFF/sections.yaml
    lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml
    lldb/test/Shell/ObjectFile/PECOFF/uuid.yaml
    lldb/test/Shell/ObjectFile/wasm/basic.yaml
    lldb/test/Shell/ObjectFile/wasm/embedded-debug-sections.yaml
    lldb/test/Shell/ObjectFile/wasm/stripped-debug-sections.yaml
    lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml
    lldb/test/Shell/Process/Windows/launch_failure.yaml
    lldb/test/Shell/SymbolFile/Breakpad/line-table-discontinuous-file-ids.test
    lldb/test/Shell/SymbolFile/Breakpad/line-table-edgecases.test
    lldb/test/Shell/SymbolFile/Breakpad/line-table-missing-file.test
    lldb/test/Shell/SymbolFile/Breakpad/line-table-mixed-path-styles.test
    lldb/test/Shell/SymbolFile/Breakpad/line-table.test
    lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-arm.yaml
    lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-parsing.test
    lldb/test/Shell/SymbolFile/Breakpad/symtab-macho.test
    lldb/test/Shell/SymbolFile/Breakpad/symtab.test
    lldb/test/Shell/SymbolFile/Breakpad/unwind-via-raSearch.test
    lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-cfi.test
    lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win-no-memory-info.yaml
    lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win.test
    lldb/test/Shell/SymbolFile/DWARF/debug_loc-aslr.s

Removed: 
    


################################################################################
diff  --git a/lld/test/COFF/align.s b/lld/test/COFF/align.s
index ca005b5e42ed..a269b6dcbcf3 100644
--- a/lld/test/COFF/align.s
+++ b/lld/test/COFF/align.s
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main /align:32 %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/allow-unknown-debug-info.test b/lld/test/COFF/allow-unknown-debug-info.test
index 1cc9e9e0b9e2..43018563f6fb 100644
--- a/lld/test/COFF/allow-unknown-debug-info.test
+++ b/lld/test/COFF/allow-unknown-debug-info.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link -safeseh:no /dll /noentry /debug %t.obj 2>&1 | FileCheck %s
 
 # CHECK: ignoring section .debug$S with unrecognized magic 0x1

diff  --git a/lld/test/COFF/alternatename.test b/lld/test/COFF/alternatename.test
index 1be61adb1850..6511a7525d0d 100644
--- a/lld/test/COFF/alternatename.test
+++ b/lld/test/COFF/alternatename.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 # RUN: lld-link /entry:foo /subsystem:console \
 # RUN:   /alternatename:foo=main /out:%t.exe %t.obj
 # RUN: lld-link /entry:foo /subsystem:console \
@@ -7,7 +7,7 @@
 # RUN:   /alternatename:nosuchsym1=nosuchsym2 \
 # RUN:   /out:%t.exe %t.obj
 
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /entry:foo /subsystem:console /out:%t.exe %t.obj
 
 --- !COFF

diff  --git a/lld/test/COFF/ar-comdat.test b/lld/test/COFF/ar-comdat.test
index 5420b5be3dd5..aa571366e90d 100644
--- a/lld/test/COFF/ar-comdat.test
+++ b/lld/test/COFF/ar-comdat.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj %s > %t1.obj
-# RUN: yaml2obj %s > %t2.obj
+# RUN: yaml2obj %s -o %t1.obj
+# RUN: yaml2obj %s -o %t2.obj
 # RUN: llvm-lib /out:%t.lib %t1.obj %t2.obj
 # RUN: lld-link /out:%t.exe /lldmap:%t.map /entry:main /subsystem:console %p/Inputs/ret42.obj %t.lib
 # RUN: FileCheck %s < %t.map

diff  --git a/lld/test/COFF/arm64-delayimport.yaml b/lld/test/COFF/arm64-delayimport.yaml
index 6bab185b0c59..6b16a54dfa11 100644
--- a/lld/test/COFF/arm64-delayimport.yaml
+++ b/lld/test/COFF/arm64-delayimport.yaml
@@ -1,6 +1,6 @@
 # REQUIRES: aarch64
 
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t.obj %p/Inputs/library-arm64.lib /alternatename:__delayLoadHelper2=main /delayload:library.dll
 # RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefix DISASM
 # RUN: llvm-readobj --coff-imports %t.exe | FileCheck %s -check-prefix IMPORTS

diff  --git a/lld/test/COFF/arm64-import2.test b/lld/test/COFF/arm64-import2.test
index 138d7659e73f..b3fa6382642f 100644
--- a/lld/test/COFF/arm64-import2.test
+++ b/lld/test/COFF/arm64-import2.test
@@ -1,6 +1,6 @@
 # REQUIRES: aarch64
 
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: llvm-objdump -d %t.obj | FileCheck %s --check-prefix BEFORE
 # RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t.obj %p/Inputs/library-arm64.lib %p/Inputs/library2-arm64.lib
 # RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefix AFTER

diff  --git a/lld/test/COFF/arm64-magic.yaml b/lld/test/COFF/arm64-magic.yaml
index a33c3461792c..e475f74dafb1 100644
--- a/lld/test/COFF/arm64-magic.yaml
+++ b/lld/test/COFF/arm64-magic.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:mainCRTStartup /subsystem:console %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/arm64-relocs-imports.test b/lld/test/COFF/arm64-relocs-imports.test
index 7364fb06f7c8..8682088bf465 100644
--- a/lld/test/COFF/arm64-relocs-imports.test
+++ b/lld/test/COFF/arm64-relocs-imports.test
@@ -1,6 +1,6 @@
 # REQUIRES: aarch64
 
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: llvm-objdump -d %t.obj | FileCheck %s --check-prefix BEFORE
 # RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t.obj %p/Inputs/library-arm64.lib
 # RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefix AFTER

diff  --git a/lld/test/COFF/armnt-blx23t.test b/lld/test/COFF/armnt-blx23t.test
index 136834b66b62..a7a2181f21f6 100644
--- a/lld/test/COFF/armnt-blx23t.test
+++ b/lld/test/COFF/armnt-blx23t.test
@@ -1,6 +1,6 @@
 # REQUIRES: arm
 
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: llvm-objdump -d %t.obj | FileCheck %s --check-prefix BEFORE
 # RUN: lld-link /entry:function /subsystem:console /out:%t.exe %t.obj
 # RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefix AFTER

diff  --git a/lld/test/COFF/armnt-branch24t.test b/lld/test/COFF/armnt-branch24t.test
index 264c27b7041a..9b07bd44fa76 100644
--- a/lld/test/COFF/armnt-branch24t.test
+++ b/lld/test/COFF/armnt-branch24t.test
@@ -1,6 +1,6 @@
 # REQUIRES: arm
 
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: llvm-objdump -d %t.obj | FileCheck %s --check-prefix BEFORE
 # RUN: lld-link /entry:function /subsystem:console /out:%t.exe %t.obj
 # RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefix AFTER

diff  --git a/lld/test/COFF/armnt-dynamicbase.test b/lld/test/COFF/armnt-dynamicbase.test
index 50d3bea54fd3..c6d42b4bacd1 100644
--- a/lld/test/COFF/armnt-dynamicbase.test
+++ b/lld/test/COFF/armnt-dynamicbase.test
@@ -1,3 +1,3 @@
-# RUN: yaml2obj < %p/Inputs/armnt-executable.obj.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/armnt-executable.obj.yaml -o %t.obj
 # RUN: not lld-link /out:%t.exe /entry:mainCRTStartup /subsystem:console %t.obj /dynamicbase:no 2>&1 | FileCheck %s
 # CHECK: dynamicbase:no is not compatible with arm

diff  --git a/lld/test/COFF/armnt-entry-point.test b/lld/test/COFF/armnt-entry-point.test
index 933c0de2860e..4452efcbe50a 100644
--- a/lld/test/COFF/armnt-entry-point.test
+++ b/lld/test/COFF/armnt-entry-point.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/armnt-executable.obj.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/armnt-executable.obj.yaml -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:mainCRTStartup /subsystem:console %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/armnt-imports.test b/lld/test/COFF/armnt-imports.test
index 4cf07fd6c7ab..51286879dd46 100644
--- a/lld/test/COFF/armnt-imports.test
+++ b/lld/test/COFF/armnt-imports.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /subsystem:console %t.obj \
 # RUN:   /entry:mainCRTStartup %p/Inputs/library.lib
 # RUN: llvm-readobj --coff-imports %t.exe | FileCheck %s

diff  --git a/lld/test/COFF/armnt-mov32t-exec.test b/lld/test/COFF/armnt-mov32t-exec.test
index 418dc4ad1d5d..42528af57971 100644
--- a/lld/test/COFF/armnt-mov32t-exec.test
+++ b/lld/test/COFF/armnt-mov32t-exec.test
@@ -1,6 +1,6 @@
 # REQUIRES: arm
 
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: llvm-objdump -d %t.obj | FileCheck %s --check-prefix BEFORE
 # RUN: lld-link /out:%t.exe /subsystem:console /entry:get_function %t.obj
 # RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefix AFTER

diff  --git a/lld/test/COFF/armnt-movt32t.test b/lld/test/COFF/armnt-movt32t.test
index f14553064962..f87dbd1e7538 100644
--- a/lld/test/COFF/armnt-movt32t.test
+++ b/lld/test/COFF/armnt-movt32t.test
@@ -1,6 +1,6 @@
 # REQUIRES: arm
 
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: llvm-objdump -d %t.obj | FileCheck %s --check-prefix BEFORE
 # RUN: lld-link /entry:get_buffer /subsystem:console /out:%t.exe %t.obj
 # RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefix AFTER

diff  --git a/lld/test/COFF/armnt-rel32.yaml b/lld/test/COFF/armnt-rel32.yaml
index b81558640c1f..c5fea4954475 100644
--- a/lld/test/COFF/armnt-rel32.yaml
+++ b/lld/test/COFF/armnt-rel32.yaml
@@ -1,6 +1,6 @@
 # REQUIRES: arm
 
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: llvm-objdump -s %t.obj | FileCheck %s --check-prefix BEFORE
 # RUN: lld-link /entry:function /subsystem:console /out:%t.exe %t.obj
 # RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix AFTER

diff  --git a/lld/test/COFF/associative-comdat-empty.test b/lld/test/COFF/associative-comdat-empty.test
index c4ee8b7256f1..54768e20b441 100644
--- a/lld/test/COFF/associative-comdat-empty.test
+++ b/lld/test/COFF/associative-comdat-empty.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: not lld-link /include:symbol /dll /noentry /nodefaultlib %t.obj /out:%t.exe 2>&1 | FileCheck %s
 
 # Tests an associative comdat being associated with an empty section errors.

diff  --git a/lld/test/COFF/base.test b/lld/test/COFF/base.test
index 25284bbfebda..645bab65fe30 100644
--- a/lld/test/COFF/base.test
+++ b/lld/test/COFF/base.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 
 # RUN: lld-link /out:%t.exe /entry:main %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DEFAULT-HEADER %s

diff  --git a/lld/test/COFF/baserel.test b/lld/test/COFF/baserel.test
index d062923ca581..4cf2e36ac107 100644
--- a/lld/test/COFF/baserel.test
+++ b/lld/test/COFF/baserel.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 #
 # RUN: lld-link /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
 # RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck %s -check-prefix=BASEREL

diff  --git a/lld/test/COFF/broken-arm-reloc.yaml b/lld/test/COFF/broken-arm-reloc.yaml
index ad4328bcb142..00a7c2d5841e 100644
--- a/lld/test/COFF/broken-arm-reloc.yaml
+++ b/lld/test/COFF/broken-arm-reloc.yaml
@@ -14,7 +14,7 @@
 #variable:
 #    .long 42
 
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: not lld-link -out:%t.exe -entry:main %t.obj 2>&1 | FileCheck %s
 
 # CHECK: error: unexpected instruction in MOVT instruction in MOV32T relocation

diff  --git a/lld/test/COFF/combined-resources.test b/lld/test/COFF/combined-resources.test
index e14c8199cc16..3529c8925b9f 100644
--- a/lld/test/COFF/combined-resources.test
+++ b/lld/test/COFF/combined-resources.test
@@ -8,15 +8,15 @@
 // > x86_64-w64-mingw32-windres combined-resources.res combined-resources.o
 // > cvtres -machine:x64 -out:combined-resources-2.o combined-resources.res
 
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main %t.obj %p/Inputs/resource.res \
 # RUN:   %p/Inputs/combined-resources.res %p/Inputs/combined-resources-2.res
 
 # RUN: llvm-readobj --coff-resources --file-headers --section-data %t.exe | \
 # RUN:   FileCheck %s
 
-# RUN: yaml2obj < %p/Inputs/combined-resources.yaml > %t-combined-resources.o
-# RUN: yaml2obj < %p/Inputs/combined-resources-2.yaml > %t-combined-resources-2.o
+# RUN: yaml2obj %p/Inputs/combined-resources.yaml -o %t-combined-resources.o
+# RUN: yaml2obj %p/Inputs/combined-resources-2.yaml -o %t-combined-resources-2.o
 
 # RUN: lld-link /lldmingw /out:%t-resobj.exe /entry:main %t.obj %p/Inputs/resource.res \
 # RUN:   %t-combined-resources.o %t-combined-resources-2.o

diff  --git a/lld/test/COFF/common-alignment.test b/lld/test/COFF/common-alignment.test
index db02d9157c85..ab36d50c53fa 100644
--- a/lld/test/COFF/common-alignment.test
+++ b/lld/test/COFF/common-alignment.test
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main %t.obj %t.obj
 # RUN: llvm-objdump -d %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/common.test b/lld/test/COFF/common.test
index 23f746a58f88..499526822984 100644
--- a/lld/test/COFF/common.test
+++ b/lld/test/COFF/common.test
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main %t.obj %t.obj
 # RUN: llvm-objdump -d %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/conflict-mangled.test b/lld/test/COFF/conflict-mangled.test
index 381c03568331..92f0c4646707 100644
--- a/lld/test/COFF/conflict-mangled.test
+++ b/lld/test/COFF/conflict-mangled.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %s > %t1.obj
-# RUN: yaml2obj < %s > %t2.obj
+# RUN: yaml2obj %s -o %t1.obj
+# RUN: yaml2obj %s -o %t2.obj
 # RUN: not lld-link /out:%t.exe %t1.obj %t2.obj >& %t.log
 # RUN: FileCheck %s < %t.log
 # RUN: not lld-link /out:%t.exe /demangle %t1.obj %t2.obj 2>&1 | FileCheck %s

diff  --git a/lld/test/COFF/conflict.test b/lld/test/COFF/conflict.test
index b46895638a83..78dac4e44c5e 100644
--- a/lld/test/COFF/conflict.test
+++ b/lld/test/COFF/conflict.test
@@ -1,6 +1,6 @@
 # REQUIRES: x86
-# RUN: yaml2obj < %s > %t1.obj
-# RUN: yaml2obj < %s > %t2.obj
+# RUN: yaml2obj %s -o %t1.obj
+# RUN: yaml2obj %s -o %t2.obj
 # RUN: not lld-link /out:%t.exe %t1.obj %t2.obj 2>&1 | FileCheck --check-prefix=OBJ %s
 
 # RUN: llvm-as -o %t.lto1.obj %S/Inputs/conflict.ll

diff  --git a/lld/test/COFF/crt-chars.test b/lld/test/COFF/crt-chars.test
index 14051e265e1f..0933c9649b80 100644
--- a/lld/test/COFF/crt-chars.test
+++ b/lld/test/COFF/crt-chars.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj
 # RUN: llvm-readobj --sections --section-data %t.dll | FileCheck %s
 

diff  --git a/lld/test/COFF/crt-dyn-initializer-order.test b/lld/test/COFF/crt-dyn-initializer-order.test
index 019f1bdf484b..1c00da5b9d8a 100644
--- a/lld/test/COFF/crt-dyn-initializer-order.test
+++ b/lld/test/COFF/crt-dyn-initializer-order.test
@@ -21,9 +21,9 @@
 # // using `clang-cl /c a.cpp | lld-link a.obj` works
 # // using `cl /c a.cpp | lld-link a.obj` fails without lld/COFF/Writer.cpp/Writer::sortSectionChunks()
 
-# RUN: yaml2obj %s > %t.obj
-# RUN: yaml2obj %S/Inputs/crt-dyn-initializer-order_1.yaml > %t1.obj
-# RUN: yaml2obj %S/Inputs/crt-dyn-initializer-order_2.yaml > %t2.obj
+# RUN: yaml2obj %s -o %t.obj
+# RUN: yaml2obj %S/Inputs/crt-dyn-initializer-order_1.yaml -o %t1.obj
+# RUN: yaml2obj %S/Inputs/crt-dyn-initializer-order_2.yaml -o %t2.obj
 
 # CHECK: Name: .CRT
 # CHECK: Characteristics [

diff  --git a/lld/test/COFF/debug-fastlink.test b/lld/test/COFF/debug-fastlink.test
index 10b414195da3..ec5c2cd400f4 100644
--- a/lld/test/COFF/debug-fastlink.test
+++ b/lld/test/COFF/debug-fastlink.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
-# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+# RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1.obj
+# RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2.obj
 
 ; If /DEBUG:FASTLINK is specified, /DEBUG:FULL is used instead
 # RUN: rm -f %t.pdb

diff  --git a/lld/test/COFF/debug.test b/lld/test/COFF/debug.test
index 3921e0ccbb33..eae6dbdfe14b 100644
--- a/lld/test/COFF/debug.test
+++ b/lld/test/COFF/debug.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main /subsystem:console %t.obj
 
 --- !COFF

diff  --git a/lld/test/COFF/def-name.test b/lld/test/COFF/def-name.test
index b971007eda37..d40f30affe80 100644
--- a/lld/test/COFF/def-name.test
+++ b/lld/test/COFF/def-name.test
@@ -1,7 +1,7 @@
 # RUN: rm -rf %t
 # RUN: mkdir -p %t
 # RUN: cd %t
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > in.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o in.obj
 
 # RUN: lld-link /entry:main in.obj
 # RUN: lld-link /entry:main /dll in.obj

diff  --git a/lld/test/COFF/default-alignment.test b/lld/test/COFF/default-alignment.test
index da8ea06a77ee..8d441827f4f9 100644
--- a/lld/test/COFF/default-alignment.test
+++ b/lld/test/COFF/default-alignment.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe %t.obj /entry:__ImageBase /subsystem:console
 # RUN: llvm-objdump -s %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/defparser.test b/lld/test/COFF/defparser.test
index 2e5223a699df..23e366d6ebfa 100644
--- a/lld/test/COFF/defparser.test
+++ b/lld/test/COFF/defparser.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 
 # RUN: echo -e "LIBRARY foo\nEXPORTS ? @" > %t.def
 # RUN: not lld-link /def:%t.def %t.obj

diff  --git a/lld/test/COFF/delayimports-armnt.yaml b/lld/test/COFF/delayimports-armnt.yaml
index 48a5ad1471dd..048752f76bce 100644
--- a/lld/test/COFF/delayimports-armnt.yaml
+++ b/lld/test/COFF/delayimports-armnt.yaml
@@ -1,5 +1,5 @@
 # REQUIRES: arm
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link %t.obj %p/Inputs/library.lib /subsystem:console \
 # RUN:   /entry:mainCRTStartup /alternatename:__delayLoadHelper2=mainCRTStartup \
 # RUN:   /delayload:library.dll /out:%t.exe

diff  --git a/lld/test/COFF/delayimports-error.test b/lld/test/COFF/delayimports-error.test
index fd72f10c5175..f630103d093f 100644
--- a/lld/test/COFF/delayimports-error.test
+++ b/lld/test/COFF/delayimports-error.test
@@ -1,8 +1,8 @@
 # RUN: mkdir -p %t.dir
-# RUN: yaml2obj < %p/Inputs/delayimports-error.yaml > %t1.obj
+# RUN: yaml2obj %p/Inputs/delayimports-error.yaml -o %t1.obj
 # RUN: lld-link /out:%t.dir/foo.dll /dll %t1.obj /export:datasym,DATA /noentry
 
-# RUN: yaml2obj < %s > %t2.obj
+# RUN: yaml2obj %s -o %t2.obj
 # RUN: not lld-link /out:%t.exe /entry:main %t2.obj %t.dir/foo.lib /delayload:foo.dll \
 # RUN:   /alternatename:__delayLoadHelper2=main /opt:noref >& %t.log
 # RUN: FileCheck %s < %t.log

diff  --git a/lld/test/COFF/delayimports32.test b/lld/test/COFF/delayimports32.test
index 3c1f892ff837..af9720e04cd2 100644
--- a/lld/test/COFF/delayimports32.test
+++ b/lld/test/COFF/delayimports32.test
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
 # RUN: lld-link -safeseh:no %t.obj %p/Inputs/std32.lib /subsystem:console \
 # RUN:   /entry:main at 0 /alternatename:___delayLoadHelper2 at 8=_main at 0 \
 # RUN:   /delayload:std32.dll /out:%t.exe

diff  --git a/lld/test/COFF/delayimporttables.yaml b/lld/test/COFF/delayimporttables.yaml
index aaf755af0baf..c9ceaab48266 100644
--- a/lld/test/COFF/delayimporttables.yaml
+++ b/lld/test/COFF/delayimporttables.yaml
@@ -1,6 +1,6 @@
-# RUN: yaml2obj %p/Inputs/delayimporttables-dll1.yaml > %t1.obj
-# RUN: yaml2obj %p/Inputs/delayimporttables-dll2.yaml > %t2.obj
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %p/Inputs/delayimporttables-dll1.yaml -o %t1.obj
+# RUN: yaml2obj %p/Inputs/delayimporttables-dll2.yaml -o %t2.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /nodefaultlib /entry:DllMain /out:%T/delayimporttables-dll1.dll /dll /implib:%t-dll1.lib %t1.obj
 # RUN: lld-link /nodefaultlib /entry:DllMain /out:%T/delayimporttables-dll2.dll /dll /implib:%t-dll2.lib %t2.obj
 # RUN: lld-link /nodefaultlib /entry:main /out:%t.exe /delayload:delayimporttables-dll1.dll /delayload:delayimporttables-dll2.dll %t.obj %t-dll1.lib %t-dll2.lib

diff  --git a/lld/test/COFF/dll.test b/lld/test/COFF/dll.test
index 66186b1dcc64..338feb850d9c 100644
--- a/lld/test/COFF/dll.test
+++ b/lld/test/COFF/dll.test
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj
 # RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2 \
 # RUN:   /export:mangled
 # RUN: llvm-objdump -p %t.dll | FileCheck --check-prefix=EXPORT %s
@@ -13,7 +13,7 @@ EXPORT-NEXT:       2   0x1010  exportfn2
 EXPORT-NEXT:       3   0x1010  exportfn3
 EXPORT-NEXT:       4   0x1010  mangled
 
-# RUN: yaml2obj < %p/Inputs/export2.yaml > %t5.obj
+# RUN: yaml2obj %p/Inputs/export2.yaml -o %t5.obj
 # RUN: rm -f %t5.lib
 # RUN: llvm-ar cru %t5.lib %t5.obj
 # RUN: lld-link /out:%t5.dll /dll %t.obj %t5.lib /export:mangled2
@@ -40,7 +40,7 @@ EXPORT-LTO-NEXT:       3   0x1030  exportfn3
 
 # RUN: lld-link /out:%t.dll /dll %t.obj /implib:%t2.lib \
 # RUN:   /export:exportfn1 /export:exportfn2
-# RUN: yaml2obj < %p/Inputs/import.yaml > %t2.obj
+# RUN: yaml2obj %p/Inputs/import.yaml -o %t2.obj
 # RUN: lld-link /out:%t2.exe /entry:main %t2.obj %t2.lib
 # RUN: llvm-readobj --coff-imports %t2.exe | FileCheck -check-prefix=IMPORT %s
 

diff  --git a/lld/test/COFF/dllimport-gc.test b/lld/test/COFF/dllimport-gc.test
index 83864d890c2c..6253268c2d27 100644
--- a/lld/test/COFF/dllimport-gc.test
+++ b/lld/test/COFF/dllimport-gc.test
@@ -1,9 +1,9 @@
-# RUN: yaml2obj < %p/Inputs/export.yaml > %t-lib.obj
+# RUN: yaml2obj %p/Inputs/export.yaml -o %t-lib.obj
 # RUN: lld-link /out:%t.dll /dll %t-lib.obj /implib:%t.lib /export:exportfn1
 
-# RUN: yaml2obj < %p/Inputs/oldname.yaml > %t-oldname.obj
+# RUN: yaml2obj %p/Inputs/oldname.yaml -o %t-oldname.obj
 
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 
 # RUN: lld-link /out:%t1.exe /entry:main %t.obj %t-oldname.obj %t.lib
 # RUN: llvm-readobj --coff-imports %t1.exe | FileCheck -check-prefix=REF %s

diff  --git a/lld/test/COFF/driver-opt.s b/lld/test/COFF/driver-opt.s
index 72459d6bb590..0acc43a24c57 100644
--- a/lld/test/COFF/driver-opt.s
+++ b/lld/test/COFF/driver-opt.s
@@ -1,5 +1,5 @@
 # RUN: mkdir -p %t.dir
-# RUN: yaml2obj < %s > %t.dir/foo.obj
+# RUN: yaml2obj %s -o %t.dir/foo.obj
 
 # RUN: rm -f %t.dir/foo.sys
 # RUN: cd %t.dir; lld-link /driver foo.obj

diff  --git a/lld/test/COFF/driver.test b/lld/test/COFF/driver.test
index 44abe4d63ee1..143d5f74fdba 100644
--- a/lld/test/COFF/driver.test
+++ b/lld/test/COFF/driver.test
@@ -5,7 +5,7 @@ MISSING: 'nosuchfile.obj': {{[Nn]}}o such file or directory
 # RUN: lld-link --version | FileCheck -check-prefix=VERSION %s
 VERSION: {{LLD [0-9]+\.[0-9]+}}
 
-# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj
 # RUN: lld-link /out:%t.dll /dll %t.obj
 # RUN: not lld-link /out:%t.exe %t.dll 2>&1 | FileCheck -check-prefix=BADFILE %s
 BADFILE: bad file type. Did you specify a DLL instead of an import library?
@@ -16,7 +16,7 @@ LIBHELP: OVERVIEW: LLVM Lib
 # RUN: not lld-link /WX /lib 2>&1 | FileCheck -check-prefix=LIBBAD %s
 LIBBAD: ignoring /lib since it's not the first argument
 
-# RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
 # RUN: not lld-link /out:/ %t.obj 2>&1 | FileCheck -check-prefix=DIR %s
 DIR: cannot open output file
 

diff  --git a/lld/test/COFF/entry-drectve.test b/lld/test/COFF/entry-drectve.test
index 0848b0a04aee..8e4ab5432244 100644
--- a/lld/test/COFF/entry-drectve.test
+++ b/lld/test/COFF/entry-drectve.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link -safeseh:no /subsystem:console /out:%t.exe %t.obj
 
 --- !COFF

diff  --git a/lld/test/COFF/entry-inference2.test b/lld/test/COFF/entry-inference2.test
index a66422fbabe2..ad57818626b9 100644
--- a/lld/test/COFF/entry-inference2.test
+++ b/lld/test/COFF/entry-inference2.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: not lld-link /out:%t.exe %t.obj /verbose > %t.log 2>&1
 # RUN: FileCheck %s < %t.log
 

diff  --git a/lld/test/COFF/entry-inference32.test b/lld/test/COFF/entry-inference32.test
index 231b468b47f6..88fe421da8de 100644
--- a/lld/test/COFF/entry-inference32.test
+++ b/lld/test/COFF/entry-inference32.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: not lld-link /out:%t.exe %t.obj /verbose > %t.log 2>&1
 # RUN: FileCheck %s < %t.log
 

diff  --git a/lld/test/COFF/entry-mangled.test b/lld/test/COFF/entry-mangled.test
index 1140e8298fbc..6812f72ae40e 100644
--- a/lld/test/COFF/entry-mangled.test
+++ b/lld/test/COFF/entry-mangled.test
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main %t.obj
 # RUN: llvm-as -o %t.lto.obj %S/Inputs/entry-mangled.ll
 # RUN: lld-link /out:%t.exe /entry:main %t.lto.obj

diff  --git a/lld/test/COFF/exclude-all.s b/lld/test/COFF/exclude-all.s
index 41caece2dd94..f1977836b18c 100644
--- a/lld/test/COFF/exclude-all.s
+++ b/lld/test/COFF/exclude-all.s
@@ -23,7 +23,7 @@ _dataSym:
 # dllexport directive for some of the symbols. In this case, the dllexported
 # symbols are still exported.
 
-# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj
 #
 # RUN: lld-link -safeseh:no -out:%t.dll -dll %t.obj -lldmingw -exclude-all-symbols -output-def:%t.def
 # RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix=DLLEXPORT %s

diff  --git a/lld/test/COFF/export-all.s b/lld/test/COFF/export-all.s
index 6292ed33e358..42bcbbc49e39 100644
--- a/lld/test/COFF/export-all.s
+++ b/lld/test/COFF/export-all.s
@@ -40,7 +40,7 @@ __imp__unexported:
 # Test specifying -export-all-symbols, on an object file that contains
 # dllexport directive for some of the symbols.
 
-# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj
 #
 # RUN: lld-link -safeseh:no -out:%t.dll -dll %t.obj -lldmingw -export-all-symbols -output-def:%t.def
 # RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix=CHECK2 %s
@@ -91,7 +91,7 @@ __imp__unexported:
 
 # Test that we handle import libraries together with -opt:noref.
 
-# RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
 # RUN: lld-link -lldmingw -dll -out:%t.dll -entry:main at 0 %t.obj -implib:%t.lib -opt:noref %p/Inputs/std32.lib -output-def:%t.def
 # RUN: echo "EOF" >> %t.def
 # RUN: cat %t.def | FileCheck -check-prefix=CHECK-IMPLIB %s

diff  --git a/lld/test/COFF/export-arm64.yaml b/lld/test/COFF/export-arm64.yaml
index ce2b56c0f6c7..72a24d5c0182 100644
--- a/lld/test/COFF/export-arm64.yaml
+++ b/lld/test/COFF/export-arm64.yaml
@@ -1,6 +1,6 @@
 # REQUIRES: aarch64
 
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2 /implib:%t.lib
 # RUN: llvm-objdump -p %t.dll | FileCheck %s
 # RUN: llvm-objdump -r %t.lib | FileCheck %s --check-prefix=RELOCS

diff  --git a/lld/test/COFF/export-armnt.yaml b/lld/test/COFF/export-armnt.yaml
index 88d198c59b6c..456564bd81fa 100644
--- a/lld/test/COFF/export-armnt.yaml
+++ b/lld/test/COFF/export-armnt.yaml
@@ -1,6 +1,6 @@
 # REQUIRES: arm
 
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 #
 # RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2 /export:exportdata,data
 # RUN: llvm-objdump -p %t.dll | FileCheck %s

diff  --git a/lld/test/COFF/export.test b/lld/test/COFF/export.test
index 32dbbfdba435..eb5681cb79ec 100644
--- a/lld/test/COFF/export.test
+++ b/lld/test/COFF/export.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj
 #
 # RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2
 # RUN: llvm-objdump -p %t.dll | FileCheck --check-prefix=CHECK1 %s

diff  --git a/lld/test/COFF/export32.test b/lld/test/COFF/export32.test
index bd7231b364b4..7c8f831d9654 100644
--- a/lld/test/COFF/export32.test
+++ b/lld/test/COFF/export32.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 #
 # RUN: lld-link -safeseh:no /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2
 # RUN: llvm-objdump -p %t.dll | FileCheck --check-prefix=CHECK1 %s

diff  --git a/lld/test/COFF/filealign.test b/lld/test/COFF/filealign.test
index d6535101c4a2..62aebe6d17e1 100644
--- a/lld/test/COFF/filealign.test
+++ b/lld/test/COFF/filealign.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 
 # RUN: lld-link /out:%t.exe /entry:main %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DEFAULT-HEADER %s

diff  --git a/lld/test/COFF/filetype.test b/lld/test/COFF/filetype.test
index e161910ec2c8..7a17ec5f2479 100644
--- a/lld/test/COFF/filetype.test
+++ b/lld/test/COFF/filetype.test
@@ -1,4 +1,4 @@
 # Make sure input file type is detected by file magic and not by extension.
 
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.lib
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.lib
 # RUN: lld-link /out:%t.exe /entry:main %t.lib

diff  --git a/lld/test/COFF/fixed.test b/lld/test/COFF/fixed.test
index e162570dfc76..a21743f724a9 100644
--- a/lld/test/COFF/fixed.test
+++ b/lld/test/COFF/fixed.test
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
 #
 # RUN: lld-link -safeseh:no %t.obj /fixed %p/Inputs/std32.lib /subsystem:console \
 # RUN:   /entry:main at 0 /debug /out:%t.fixed.exe
@@ -10,7 +10,7 @@
 # RUN:   /entry:main at 0 /debug /out:%t.exe
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=EXEREL %s
 #
-# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj
 #
 # RUN: lld-link -safeseh:no %t.obj /dll /fixed /debug /out:%t.fixed.dll
 # RUN: llvm-readobj --file-headers %t.fixed.dll | FileCheck -check-prefix=DLLFIXED %s

diff  --git a/lld/test/COFF/force-multiple.test b/lld/test/COFF/force-multiple.test
index 9f60e1394a3e..ef4a59f1018f 100644
--- a/lld/test/COFF/force-multiple.test
+++ b/lld/test/COFF/force-multiple.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %s > %t1.obj
-# RUN: yaml2obj < %s > %t2.obj
+# RUN: yaml2obj %s -o %t1.obj
+# RUN: yaml2obj %s -o %t2.obj
 
 # RUN: not lld-link /out:%t.exe /entry:main %t1.obj %t2.obj >& %t.log
 # RUN: FileCheck -check-prefix=ERROR %s < %t.log

diff  --git a/lld/test/COFF/force.test b/lld/test/COFF/force.test
index 20c4e1a6457f..fcbeeade8c8a 100644
--- a/lld/test/COFF/force.test
+++ b/lld/test/COFF/force.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: not lld-link /out:%t.exe /entry:main %t.obj >& %t.log
 # RUN: FileCheck -check-prefix=ERROR %s < %t.log
 # RUN: lld-link /out:%t.exe /entry:main %t.obj /force >& %t.log

diff  --git a/lld/test/COFF/guardcf-align.s b/lld/test/COFF/guardcf-align.s
index 5529565ed5fb..0535dc8ac3d8 100644
--- a/lld/test/COFF/guardcf-align.s
+++ b/lld/test/COFF/guardcf-align.s
@@ -1,6 +1,6 @@
 # REQUIRES: x86
 # RUN: llvm-mc -triple x86_64-windows-msvc -filetype=obj -o %t.obj %s
-# RUN: yaml2obj < %p/Inputs/guardcf-align-foobar.yaml \
+# RUN: yaml2obj %p/Inputs/guardcf-align-foobar.yaml \
 # RUN:     > %T/guardcf-align-foobar.obj
 # RUN: lld-link -out:%T/guardcf-align.exe -entry:main -guard:cf \
 # RUN:     %t.obj %T/guardcf-align-foobar.obj

diff  --git a/lld/test/COFF/guardcf-thunk.s b/lld/test/COFF/guardcf-thunk.s
index ec0bd1d4579c..6411a54ba71b 100644
--- a/lld/test/COFF/guardcf-thunk.s
+++ b/lld/test/COFF/guardcf-thunk.s
@@ -1,7 +1,7 @@
 # REQUIRES: x86
 
 # Make a DLL that exports exportfn1.
-# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj
 # RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /implib:%t.lib
 
 # Make an obj that takes the address of that exported function.

diff  --git a/lld/test/COFF/guardcf.test b/lld/test/COFF/guardcf.test
index 57dca5870d0f..061feb320bac 100644
--- a/lld/test/COFF/guardcf.test
+++ b/lld/test/COFF/guardcf.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /entry:main /out:%t.exe %t.obj
 
 --- !COFF

diff  --git a/lld/test/COFF/heap.test b/lld/test/COFF/heap.test
index 6adcf02b1429..f9b772624906 100644
--- a/lld/test/COFF/heap.test
+++ b/lld/test/COFF/heap.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 
 # RUN: lld-link /out:%t.exe /entry:main %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s

diff  --git a/lld/test/COFF/hello32.test b/lld/test/COFF/hello32.test
index 02bdf2cea009..6c3d72384beb 100644
--- a/lld/test/COFF/hello32.test
+++ b/lld/test/COFF/hello32.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
 # RUN: lld-link -safeseh:no %t.obj %p/Inputs/std32.lib /subsystem:console \
 # RUN:   /entry:main at 0 /out:%t.exe /appcontainer
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=HEADER %s

diff  --git a/lld/test/COFF/icf-associative.test b/lld/test/COFF/icf-associative.test
index 3b2aa5de41b1..ef7517afd474 100644
--- a/lld/test/COFF/icf-associative.test
+++ b/lld/test/COFF/icf-associative.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /opt:icf /entry:foo /out:%t.exe /subsystem:console /include:bar \
 # RUN:   /debug /verbose %t.obj > %t.log 2>&1
 # RUN: FileCheck %s < %t.log

diff  --git a/lld/test/COFF/icf-circular.test b/lld/test/COFF/icf-circular.test
index c1135660a780..c94668a5d327 100644
--- a/lld/test/COFF/icf-circular.test
+++ b/lld/test/COFF/icf-circular.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \
 # RUN:   /verbose %t.obj > %t.log 2>&1
 # RUN: FileCheck %s < %t.log

diff  --git a/lld/test/COFF/icf-circular2.test b/lld/test/COFF/icf-circular2.test
index 3b8eb8f424ac..3d88d7f50256 100644
--- a/lld/test/COFF/icf-circular2.test
+++ b/lld/test/COFF/icf-circular2.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \
 # RUN:   /verbose %t.obj > %t.log 2>&1
 # RUN: FileCheck %s < %t.log

diff  --git a/lld/test/COFF/icf-data.test b/lld/test/COFF/icf-data.test
index 20bdecaf3cfe..786ad7beec66 100644
--- a/lld/test/COFF/icf-data.test
+++ b/lld/test/COFF/icf-data.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \
 # RUN:   /verbose %t.obj > %t.log 2>&1
 # RUN: FileCheck %s < %t.log

diff  --git a/lld/test/COFF/icf-
diff erent-align.test b/lld/test/COFF/icf-
diff erent-align.test
index 0e2fce9f65dc..1fd0dc26e9ec 100644
--- a/lld/test/COFF/icf-
diff erent-align.test
+++ b/lld/test/COFF/icf-
diff erent-align.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \
 # RUN:   /verbose %t.obj > %t.log 2>&1
 # RUN: FileCheck %s < %t.log

diff  --git a/lld/test/COFF/icf-local.test b/lld/test/COFF/icf-local.test
index db690b8dc813..0c61ce89f226 100644
--- a/lld/test/COFF/icf-local.test
+++ b/lld/test/COFF/icf-local.test
@@ -1,6 +1,6 @@
 # COMDAT sections with non-external linkage should not be merged by ICF.
 
-# RUN: yaml2obj < %s > %t1.obj
+# RUN: yaml2obj %s -o %t1.obj
 # RUN: sed s/foo/main/ %s | yaml2obj > %t2.obj
 # RUN: lld-link /out:%t.exe /entry:main /subsystem:console /verbose \
 # RUN:   %t1.obj %t2.obj > %t.log 2>&1

diff  --git a/lld/test/COFF/icf-simple.test b/lld/test/COFF/icf-simple.test
index 19f13c6065fa..a832707997e9 100644
--- a/lld/test/COFF/icf-simple.test
+++ b/lld/test/COFF/icf-simple.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /opt:icf /entry:foo /out:%t.exe /subsystem:console /include:bar \
 # RUN:   /verbose %t.obj > %t.log 2>&1
 # RUN: FileCheck -check-prefix=ICF %s < %t.log

diff  --git a/lld/test/COFF/ignore-many.test b/lld/test/COFF/ignore-many.test
index 31398106c171..cd8a8345e559 100644
--- a/lld/test/COFF/ignore-many.test
+++ b/lld/test/COFF/ignore-many.test
@@ -1,7 +1,7 @@
 Tests /ignore with more than one argument.
 
-RUN: yaml2obj %S/ignore4217.yaml > %t1.obj
-RUN: yaml2obj %S/Inputs/pdb-type-server-missing-2.yaml > %t2.obj
+RUN: yaml2obj %S/ignore4217.yaml -o %t1.obj
+RUN: yaml2obj %S/Inputs/pdb-type-server-missing-2.yaml -o %t2.obj
 RUN: echo foo > %t3.order
 
 RUN: lld-link /entry:main /out:%t.exe %t1.obj %t2.obj /order:@%t3.order /debug 2>&1 | FileCheck -check-prefix=WARNINGS %s

diff  --git a/lld/test/COFF/ignore4217.yaml b/lld/test/COFF/ignore4217.yaml
index 5f9d3e3ddf84..82cf9e1f4833 100644
--- a/lld/test/COFF/ignore4217.yaml
+++ b/lld/test/COFF/ignore4217.yaml
@@ -1,5 +1,5 @@
 # Tests that /ignore:4217 suppresses "locally defined symbol imported" warnings.
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 
 # RUN: lld-link -entry:main -out:%t.exe %t.obj 2>&1 \
 # RUN:     | FileCheck -check-prefix=WARNINGS %s

diff  --git a/lld/test/COFF/imports-mangle.test b/lld/test/COFF/imports-mangle.test
index 71140b7531e8..4c7e3d5bab84 100644
--- a/lld/test/COFF/imports-mangle.test
+++ b/lld/test/COFF/imports-mangle.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /opt:noref /entry:main \
 # RUN:   %t.obj %p/Inputs/imports-mangle.lib
 # RUN: llvm-readobj --coff-imports %t.exe | FileCheck %s

diff  --git a/lld/test/COFF/include.test b/lld/test/COFF/include.test
index e7e9095cff8b..8879ee5bd7a6 100644
--- a/lld/test/COFF/include.test
+++ b/lld/test/COFF/include.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 
 # RUN: lld-link /out:%t.exe /entry:main %t.obj /verbose >& %t.log
 ### FileCheck doesn't like empty input, so write something.

diff  --git a/lld/test/COFF/include2.test b/lld/test/COFF/include2.test
index 528a27319e7b..557de47d9e19 100644
--- a/lld/test/COFF/include2.test
+++ b/lld/test/COFF/include2.test
@@ -1,6 +1,6 @@
-# RUN: yaml2obj < %p/Inputs/include1a.yaml > %t1.obj
-# RUN: yaml2obj < %p/Inputs/include1b.yaml > %t2.obj
-# RUN: yaml2obj < %p/Inputs/include1c.yaml > %t3.obj
+# RUN: yaml2obj %p/Inputs/include1a.yaml -o %t1.obj
+# RUN: yaml2obj %p/Inputs/include1b.yaml -o %t2.obj
+# RUN: yaml2obj %p/Inputs/include1c.yaml -o %t3.obj
 # RUN: rm -f %t2.lib %t3.lib
 # RUN: llvm-ar cru %t2.lib %t2.obj
 # RUN: llvm-ar cru %t3.lib %t3.obj

diff  --git a/lld/test/COFF/includeoptional.yaml b/lld/test/COFF/includeoptional.yaml
index 65eb140d162c..d9dff1536ade 100644
--- a/lld/test/COFF/includeoptional.yaml
+++ b/lld/test/COFF/includeoptional.yaml
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %s > %t.main.obj
-# RUN: yaml2obj < %p/Inputs/include1c.yaml > %t.lib.obj
+# RUN: yaml2obj %s -o %t.main.obj
+# RUN: yaml2obj %p/Inputs/include1c.yaml -o %t.lib.obj
 # RUN: rm -f %t.lib.lib
 # RUN: llvm-ar cru %t.lib.lib %t.lib.obj
 # RUN: lld-link /out:%t.exe /entry:main /includeoptional:bar /includeoptional:actuallymissing %t.main.obj %t.lib.lib /verbose >& %t.log

diff  --git a/lld/test/COFF/includeoptional2.yaml b/lld/test/COFF/includeoptional2.yaml
index 48b2112773af..47178e82414b 100644
--- a/lld/test/COFF/includeoptional2.yaml
+++ b/lld/test/COFF/includeoptional2.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: not lld-link /out:%t.exe /entry:main /includeoptional:undeffunc %t.obj /verbose 2>&1 | FileCheck %s
 
 # CHECK: error: undefined symbol: undeffunc

diff  --git a/lld/test/COFF/incremental.test b/lld/test/COFF/incremental.test
index 01f27487da3c..57c06ab820f8 100644
--- a/lld/test/COFF/incremental.test
+++ b/lld/test/COFF/incremental.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj
 
 # RUN: lld-link -out:%t.dll -dll %t.obj 2>&1 \
 # RUN:   | FileCheck -allow-empty -check-prefix=NOWARN %s

diff  --git a/lld/test/COFF/internal.test b/lld/test/COFF/internal.test
index bc958cb4bd19..01995d88fb2c 100644
--- a/lld/test/COFF/internal.test
+++ b/lld/test/COFF/internal.test
@@ -1,8 +1,8 @@
 # Test that non-external symbols don't conflict
 
-# RUN: yaml2obj < %s > %t1.obj
-# RUN: yaml2obj < %s > %t2.obj
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t3.obj
+# RUN: yaml2obj %s -o %t1.obj
+# RUN: yaml2obj %s -o %t2.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t3.obj
 # RUN: lld-link /out:%t.exe /entry:main %t1.obj %t2.obj %t3.obj
 
 --- !COFF

diff  --git a/lld/test/COFF/invalid-debug-type.test b/lld/test/COFF/invalid-debug-type.test
index de6add7dfdbd..75a9bd1aa117 100644
--- a/lld/test/COFF/invalid-debug-type.test
+++ b/lld/test/COFF/invalid-debug-type.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
-# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+# RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1.obj
+# RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2.obj
 # RUN: lld-link /debug /debugtype:invalid /pdb:%t.pdb /dll /out:%t.dll \
 # RUN:     /entry:main /nodefaultlib %t1.obj %t2.obj 2>&1 | FileCheck %s
 # CHECK: /debugtype: unknown option 'invalid'

diff  --git a/lld/test/COFF/invalid-debug.test b/lld/test/COFF/invalid-debug.test
index 67f794f8b1b3..204c36ef9197 100644
--- a/lld/test/COFF/invalid-debug.test
+++ b/lld/test/COFF/invalid-debug.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
-# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+# RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1.obj
+# RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2.obj
 # RUN: not lld-link /debug /debug:invalid /pdb:%t.pdb /dll /out:%t.dll /entry:main /nodefaultlib \
 # RUN:   %t1.obj %t2.obj 2>&1 | FileCheck %s
 

diff  --git a/lld/test/COFF/invalid-obj.test b/lld/test/COFF/invalid-obj.test
index 6f76c3702aa7..d24daa48ddbf 100644
--- a/lld/test/COFF/invalid-obj.test
+++ b/lld/test/COFF/invalid-obj.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: not lld-link %t.obj 2>&1 | FileCheck %s
 
 # CHECK: getSectionName failed: #1:

diff  --git a/lld/test/COFF/invalid-section-number.test b/lld/test/COFF/invalid-section-number.test
index bada902d7bc0..432d3549bb16 100644
--- a/lld/test/COFF/invalid-section-number.test
+++ b/lld/test/COFF/invalid-section-number.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: not lld-link %t.obj 2>&1 | FileCheck %s
 
 # CHECK: foo should not refer to special section -10

diff  --git a/lld/test/COFF/largeaddressaware.test b/lld/test/COFF/largeaddressaware.test
index 50f703a11eb4..e2ffdd30e818 100644
--- a/lld/test/COFF/largeaddressaware.test
+++ b/lld/test/COFF/largeaddressaware.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
 # RUN: lld-link -safeseh:no %t.obj %p/Inputs/std32.lib /subsystem:console \
 # RUN:   /entry:main at 0 /out:%t.exe /largeaddressaware
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=HEADER %s

diff  --git a/lld/test/COFF/linkrepro-pdb.test b/lld/test/COFF/linkrepro-pdb.test
index f248c431458b..34152a459077 100644
--- a/lld/test/COFF/linkrepro-pdb.test
+++ b/lld/test/COFF/linkrepro-pdb.test
@@ -14,7 +14,7 @@ RUN: cat repro/response.txt | FileCheck -check-prefix=PDB %s
 PDB: -out:linkrepro-pdb.test.tmp.exe
 PDB-NEXT: -pdb:linkrepro-pdb.test.tmp.pdb
 
-RUN: yaml2obj < %p/Inputs/export.yaml > %t1.obj
+RUN: yaml2obj %p/Inputs/export.yaml -o %t1.obj
 RUN: lld-link /out:%t1.dll /dll %t1.obj /implib:%t1.lib /export:exportfn1 /export:exportfn2 /linkrepro:.
 RUN: tar xf repro.tar
 RUN: cat repro/response.txt | FileCheck -check-prefix=IMP %s

diff  --git a/lld/test/COFF/linkrepro.test b/lld/test/COFF/linkrepro.test
index a2a9d64c9809..9a1db6e26369 100644
--- a/lld/test/COFF/linkrepro.test
+++ b/lld/test/COFF/linkrepro.test
@@ -2,7 +2,7 @@
 
 # RUN: rm -rf %t.dir
 # RUN: mkdir -p %t.dir/build1 %t.dir/build2 %t.dir/build3
-# RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
 
 # RUN: cd %t.dir/build1
 # RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console \

diff  --git a/lld/test/COFF/loadcfg.test b/lld/test/COFF/loadcfg.test
index 52326861ea91..6a1d7ba06d90 100644
--- a/lld/test/COFF/loadcfg.test
+++ b/lld/test/COFF/loadcfg.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe %t.obj /entry:main /subsystem:console
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/loadcfg32.test b/lld/test/COFF/loadcfg32.test
index dffdab8b146e..ce8ba99515d1 100644
--- a/lld/test/COFF/loadcfg32.test
+++ b/lld/test/COFF/loadcfg32.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link -safeseh:no /out:%t.exe %t.obj /entry:main /subsystem:console
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/locally-imported-arm64.test b/lld/test/COFF/locally-imported-arm64.test
index f305d6814dd1..aebb30e1b42e 100644
--- a/lld/test/COFF/locally-imported-arm64.test
+++ b/lld/test/COFF/locally-imported-arm64.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main %t.obj
 # RUN: llvm-objdump -s %t.exe | FileCheck %s
 # RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s

diff  --git a/lld/test/COFF/locally-imported.test b/lld/test/COFF/locally-imported.test
index 6c9f061a148c..1a2144d759af 100644
--- a/lld/test/COFF/locally-imported.test
+++ b/lld/test/COFF/locally-imported.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main %t.obj 2>&1 | FileCheck -check-prefix=WARN %s
 # RUN: llvm-objdump -s %t.exe | FileCheck %s
 # RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s

diff  --git a/lld/test/COFF/locally-imported32.test b/lld/test/COFF/locally-imported32.test
index 993099d423a5..cfcd95c90ddd 100644
--- a/lld/test/COFF/locally-imported32.test
+++ b/lld/test/COFF/locally-imported32.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link -safeseh:no /out:%t.exe /entry:main %t.obj
 # RUN: llvm-objdump -s %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/long-section-name.test b/lld/test/COFF/long-section-name.test
index 458c44122ddb..af285c22ddbe 100644
--- a/lld/test/COFF/long-section-name.test
+++ b/lld/test/COFF/long-section-name.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main %t.obj 2>&1 | FileCheck %s --check-prefix=WARN
 # RUN: llvm-readobj --sections %t.exe | FileCheck %s
 # RUN: lld-link /debug /out:%t2.exe /entry:main %t.obj 2>&1 | FileCheck %s --check-prefix=WARN

diff  --git a/lld/test/COFF/machine.test b/lld/test/COFF/machine.test
index 921b7e393149..45e9c822843a 100644
--- a/lld/test/COFF/machine.test
+++ b/lld/test/COFF/machine.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %p/Inputs/machine-x64.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/machine-x64.yaml -o %t.obj
 # RUN: lld-link -safeseh:no /entry:main /subsystem:console /out:%t.exe %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=AMD64 %s
 # RUN: lld-link -safeseh:no /entry:main /subsystem:console /machine:x64 \
@@ -7,7 +7,7 @@
 
 AMD64: Machine: IMAGE_FILE_MACHINE_AMD64
 
-# RUN: yaml2obj %p/Inputs/machine-x86.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/machine-x86.yaml -o %t.obj
 # RUN: lld-link -safeseh:no /entry:main /subsystem:console /out:%t.exe %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=I386 %s
 # RUN: lld-link -safeseh:no /entry:main /subsystem:console /machine:x86 \
@@ -16,12 +16,12 @@ AMD64: Machine: IMAGE_FILE_MACHINE_AMD64
 
 I386: Machine: IMAGE_FILE_MACHINE_I386
 
-# RUN: yaml2obj %p/Inputs/machine-x64.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/machine-x64.yaml -o %t.obj
 # RUN: not lld-link /entry:main /subsystem:console /machine:x86 \
 # RUN:   /out:%t.exe %t.obj /fixed >& %t.log
 # RUN: FileCheck -check-prefix=INCOMPAT %s < %t.log
 
-# RUN: yaml2obj %p/Inputs/machine-x86.yaml > %t1.obj
+# RUN: yaml2obj %p/Inputs/machine-x86.yaml -o %t1.obj
 # RUN: sed -e s/main/foo/ %p/Inputs/machine-x64.yaml | yaml2obj > %t2.obj
 # RUN: not lld-link /entry:main /subsystem:console /out:%t.exe \
 # RUN:   %t1.obj %t2.obj >& %t.log

diff  --git a/lld/test/COFF/manifest.test b/lld/test/COFF/manifest.test
index 31587b43e2e9..f3a388f8bbe1 100644
--- a/lld/test/COFF/manifest.test
+++ b/lld/test/COFF/manifest.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 
 # RUN: rm -f %t.exe.manifest
 # RUN: lld-link /out:%t.exe /entry:main %t.obj

diff  --git a/lld/test/COFF/manifestinput-error.test b/lld/test/COFF/manifestinput-error.test
index 22ddc6719104..9d47b9c9a79e 100644
--- a/lld/test/COFF/manifestinput-error.test
+++ b/lld/test/COFF/manifestinput-error.test
@@ -1,7 +1,7 @@
 # UNSUPPORTED: manifest_tool
 # UNSUPPORTED: libxml2
 
-# RUN: yaml2obj %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 # RUN: not lld-link /out:%t.exe /entry:main \
 # RUN:   /manifest:embed \
 # RUN:   /manifestuac:"level='requireAdministrator'" \

diff  --git a/lld/test/COFF/manifestinput-nowarning.test b/lld/test/COFF/manifestinput-nowarning.test
index d8dd864d533f..0cf542e79289 100644
--- a/lld/test/COFF/manifestinput-nowarning.test
+++ b/lld/test/COFF/manifestinput-nowarning.test
@@ -1,7 +1,7 @@
 # UNSUPPORTED: libxml2
 # REQUIRES: manifest_tool
 
-# RUN: yaml2obj %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main \
 # RUN:   /manifest:embed \
 # RUN:   /manifestuac:"level='requireAdministrator'" \

diff  --git a/lld/test/COFF/manifestinput.test b/lld/test/COFF/manifestinput.test
index cfc28f248b82..04af80a13312 100644
--- a/lld/test/COFF/manifestinput.test
+++ b/lld/test/COFF/manifestinput.test
@@ -1,6 +1,6 @@
 # REQUIRES: manifest_tool
 
-# RUN: yaml2obj %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main \
 # RUN:   /manifest:embed \
 # RUN:   /manifestuac:"level='requireAdministrator'" \

diff  --git a/lld/test/COFF/map.test b/lld/test/COFF/map.test
index 0ec27fb33bdc..7e229613dcd9 100644
--- a/lld/test/COFF/map.test
+++ b/lld/test/COFF/map.test
@@ -1,7 +1,7 @@
-# RUN: yaml2obj < %p/Inputs/export.yaml > %t-dll.obj
+# RUN: yaml2obj %p/Inputs/export.yaml -o %t-dll.obj
 # RUN: lld-link /out:%t.dll /dll %t-dll.obj /implib:%t-dll.lib \
 # RUN:   /export:exportfn1 /export:exportfn2
-# RUN: yaml2obj < %p/Inputs/map.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/map.yaml -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main %t.obj %t-dll.lib /map:%T/foo.map  /lldmap
 # RUN: FileCheck -check-prefix=MAP -strict-whitespace %s < %T/foo.map
 # RUN: FileCheck -check-prefix=LLDMAP -strict-whitespace %s < %t.map

diff  --git a/lld/test/COFF/merge-resource-manifest.test b/lld/test/COFF/merge-resource-manifest.test
index f15a9dedcd0a..1d87fa440bce 100644
--- a/lld/test/COFF/merge-resource-manifest.test
+++ b/lld/test/COFF/merge-resource-manifest.test
@@ -1,8 +1,8 @@
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.o
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.o
 
-# RUN: yaml2obj < %p/Inputs/manifest-lang0.yaml > %t-manifest-lang0.o
-# RUN: yaml2obj < %p/Inputs/manifest-lang1.yaml > %t-manifest-lang1.o
-# RUN: yaml2obj < %p/Inputs/manifest-lang2.yaml > %t-manifest-lang2.o
+# RUN: yaml2obj %p/Inputs/manifest-lang0.yaml -o %t-manifest-lang0.o
+# RUN: yaml2obj %p/Inputs/manifest-lang1.yaml -o %t-manifest-lang1.o
+# RUN: yaml2obj %p/Inputs/manifest-lang2.yaml -o %t-manifest-lang2.o
 
 # RUN: lld-link /lldmingw /out:%t.exe /entry:main %t.o %p/Inputs/manifest-lang0.res %p/Inputs/manifest-lang1.res
 # RUN: llvm-readobj --coff-resources %t.exe | FileCheck %s

diff  --git a/lld/test/COFF/merge.test b/lld/test/COFF/merge.test
index fcffb70e0f7b..af368407e7e8 100644
--- a/lld/test/COFF/merge.test
+++ b/lld/test/COFF/merge.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main /subsystem:console /force \
 # RUN:   /merge:.foo=.abc /merge:.bar=.def %t.obj /debug
 # RUN: llvm-readobj --sections %t.exe | FileCheck %s

diff  --git a/lld/test/COFF/mixed-resource-obj.yaml b/lld/test/COFF/mixed-resource-obj.yaml
index 74f3bb2a3500..61b6cf190bc8 100644
--- a/lld/test/COFF/mixed-resource-obj.yaml
+++ b/lld/test/COFF/mixed-resource-obj.yaml
@@ -1,6 +1,6 @@
 # REQUIRES: x86
 
-# RUN: yaml2obj < %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 
 # Test that we get both the resource and the code from a single object
 # file that contains both, while merging resources from another object

diff  --git a/lld/test/COFF/no-ipi-stream.test b/lld/test/COFF/no-ipi-stream.test
index e9b2a31bc0a7..5d19020d01c4 100644
--- a/lld/test/COFF/no-ipi-stream.test
+++ b/lld/test/COFF/no-ipi-stream.test
@@ -1,4 +1,4 @@
 # RUN: rm -rf %t && mkdir %t
-# RUN: yaml2obj < %p/Inputs/no-ipi-stream-obj.obj.yaml > %t/no-ipi-stream-obj.obj
+# RUN: yaml2obj %p/Inputs/no-ipi-stream-obj.obj.yaml -o %t/no-ipi-stream-obj.obj
 # RUN: llvm-pdbutil yaml2pdb %p/Inputs/no-ipi-stream-pdb.pdb.yaml -pdb=%t/no-ipi-stream-pdb.pdb
 # RUN: lld-link -safeseh:no /dll /noentry /debug %t/no-ipi-stream-obj.obj

diff  --git a/lld/test/COFF/noentry.test b/lld/test/COFF/noentry.test
index 84de668b3d4c..395549be04dc 100644
--- a/lld/test/COFF/noentry.test
+++ b/lld/test/COFF/noentry.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj
 # RUN: lld-link /out:%t.dll /dll %t.obj
 # RUN: llvm-readobj --file-headers %t.dll | FileCheck -check-prefix=ENTRY %s
 # RUN: lld-link /out:%t.dll /dll /noentry %t.obj

diff  --git a/lld/test/COFF/opt.test b/lld/test/COFF/opt.test
index ed43b6048085..dd944978c9b5 100644
--- a/lld/test/COFF/opt.test
+++ b/lld/test/COFF/opt.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 
 # RUN: lld-link /out:%t.exe /entry:main %t.obj \
 # RUN:   /verbose 2>&1 | FileCheck -check-prefix=REF %s

diff  --git a/lld/test/COFF/options.test b/lld/test/COFF/options.test
index b700c6529f9f..0dd889042869 100644
--- a/lld/test/COFF/options.test
+++ b/lld/test/COFF/options.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 
 # RUN: lld-link /out:%t.exe /entry:main %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=BIND %s

diff  --git a/lld/test/COFF/order-i386.test b/lld/test/COFF/order-i386.test
index acd9ad2aa2c9..edf7203b81b1 100644
--- a/lld/test/COFF/order-i386.test
+++ b/lld/test/COFF/order-i386.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 
 # RUN: echo fn1 > %t.order
 # RUN: echo fn2 >> %t.order

diff  --git a/lld/test/COFF/order.test b/lld/test/COFF/order.test
index 0006550e56ae..e068fefba496 100644
--- a/lld/test/COFF/order.test
+++ b/lld/test/COFF/order.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %s > %t1.obj
-# RUN: yaml2obj < %p/Inputs/order.yaml > %t2.obj
+# RUN: yaml2obj %s -o %t1.obj
+# RUN: yaml2obj %p/Inputs/order.yaml -o %t2.obj
 
 # RUN: echo fn1 > %t.order
 # RUN: echo fn2 >> %t.order

diff  --git a/lld/test/COFF/out.test b/lld/test/COFF/out.test
index 6d7667e906e7..478e7cffacd2 100644
--- a/lld/test/COFF/out.test
+++ b/lld/test/COFF/out.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 
 # RUN: mkdir -p %T/out/tmp
 # RUN: cp %t.obj %T/out/out1.obj

diff  --git a/lld/test/COFF/output-chars.test b/lld/test/COFF/output-chars.test
index 2733c3da1734..2b20b0351a23 100644
--- a/lld/test/COFF/output-chars.test
+++ b/lld/test/COFF/output-chars.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj
 # RUN: llvm-readobj --sections %t.dll | FileCheck %s
 # RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj /section:.foo,rwe

diff  --git a/lld/test/COFF/pdata-arm64-bad.yaml b/lld/test/COFF/pdata-arm64-bad.yaml
index d6b496745795..8b43b66cc7ce 100644
--- a/lld/test/COFF/pdata-arm64-bad.yaml
+++ b/lld/test/COFF/pdata-arm64-bad.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: not lld-link /out:%t.exe /entry:func1 /subsystem:console %t.obj 2>&1 | FileCheck %s
 
 # This file is like pdata-arm64.yaml, except that .pdata has been extended with

diff  --git a/lld/test/COFF/pdata-arm64.yaml b/lld/test/COFF/pdata-arm64.yaml
index f868cb86058f..e6b35322e913 100644
--- a/lld/test/COFF/pdata-arm64.yaml
+++ b/lld/test/COFF/pdata-arm64.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 #
 # RUN: lld-link /out:%t.exe /entry:func1 /subsystem:console %t.obj
 # RUN: llvm-objdump -s --section=.pdata %t.exe | FileCheck --check-prefix=PDATA %s

diff  --git a/lld/test/COFF/pdb-exe-path-dots.test b/lld/test/COFF/pdb-exe-path-dots.test
index 9f1e031ceb71..0588bf2532ed 100644
--- a/lld/test/COFF/pdb-exe-path-dots.test
+++ b/lld/test/COFF/pdb-exe-path-dots.test
@@ -1,5 +1,5 @@
-RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
-RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1.obj
+RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2.obj
 RUN: rm -rf %t
 RUN: mkdir %t
 RUN: mkdir %t/foo

diff  --git a/lld/test/COFF/pdb-file-static.test b/lld/test/COFF/pdb-file-static.test
index f08f717b40af..e92a1d606321 100644
--- a/lld/test/COFF/pdb-file-static.test
+++ b/lld/test/COFF/pdb-file-static.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj %S/Inputs/pdb-file-statics-a.yaml > %t.a.obj
-# RUN: yaml2obj %S/Inputs/pdb-file-statics-b.yaml > %t.b.obj
+# RUN: yaml2obj %S/Inputs/pdb-file-statics-a.yaml -o %t.a.obj
+# RUN: yaml2obj %S/Inputs/pdb-file-statics-b.yaml -o %t.b.obj
 # RUN: lld-link %t.a.obj %t.b.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb
 # RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
 

diff  --git a/lld/test/COFF/pdb-global-hashes.test b/lld/test/COFF/pdb-global-hashes.test
index 0ca60057e704..13039d42fe26 100644
--- a/lld/test/COFF/pdb-global-hashes.test
+++ b/lld/test/COFF/pdb-global-hashes.test
@@ -1,6 +1,6 @@
-RUN: yaml2obj %p/Inputs/pdb-hashes-1.yaml > %t.1.obj
-RUN: yaml2obj %p/Inputs/pdb-hashes-2.yaml > %t.2.obj
-RUN: yaml2obj %p/Inputs/pdb-hashes-2-missing.yaml > %t.2.missing.obj
+RUN: yaml2obj %p/Inputs/pdb-hashes-1.yaml -o %t.1.obj
+RUN: yaml2obj %p/Inputs/pdb-hashes-2.yaml -o %t.2.obj
+RUN: yaml2obj %p/Inputs/pdb-hashes-2-missing.yaml -o %t.2.missing.obj
 RUN: lld-link /debug %t.1.obj %t.2.obj /entry:main /nodefaultlib /PDB:%t.nohash.pdb
 RUN: lld-link /debug:ghash %t.1.obj %t.2.obj /entry:main /nodefaultlib /PDB:%t.hash.pdb
 RUN: lld-link /debug:ghash %t.1.obj %t.2.missing.obj /entry:main /nodefaultlib /PDB:%t.mixed.pdb

diff  --git a/lld/test/COFF/pdb-globals.test b/lld/test/COFF/pdb-globals.test
index c7381ae61ebe..a8fa2f615a73 100644
--- a/lld/test/COFF/pdb-globals.test
+++ b/lld/test/COFF/pdb-globals.test
@@ -1,4 +1,4 @@
-RUN: yaml2obj %S/Inputs/pdb-globals.yaml > %t.obj
+RUN: yaml2obj %S/Inputs/pdb-globals.yaml -o %t.obj
 RUN: lld-link /debug /nodefaultlib /entry:main /force /out:%t.exe /pdb:%t.pdb %t.obj
 RUN: llvm-pdbutil dump -symbols -globals %t.pdb | FileCheck %s
 

diff  --git a/lld/test/COFF/pdb-natvis.test b/lld/test/COFF/pdb-natvis.test
index 2db68b6bc71a..15cff5011ef2 100644
--- a/lld/test/COFF/pdb-natvis.test
+++ b/lld/test/COFF/pdb-natvis.test
@@ -1,6 +1,6 @@
 REQUIRES: diasdk
 
-RUN: yaml2obj %p/Inputs/generic.yaml > %t.obj
+RUN: yaml2obj %p/Inputs/generic.yaml -o %t.obj
 RUN: lld-link /DEBUG %t.obj /nodefaultlib /entry:main /NATVIS:%p/Inputs/natvis-1.natvis \
 RUN:   /NATVIS:%p/Inputs/natvis-2.natvis /NATVIS:%p/Inputs/natvis-3.natvis /OUT:%t.exe \
 RUN:   /PDB:%t.pdb

diff  --git a/lld/test/COFF/pdb-none.test b/lld/test/COFF/pdb-none.test
index 4f5ba0ebb4df..15d2d12ad284 100644
--- a/lld/test/COFF/pdb-none.test
+++ b/lld/test/COFF/pdb-none.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
-# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+# RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1.obj
+# RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2.obj
 # RUN: rm -f %t.pdb %t.dll
 # RUN: lld-link /debug /debugtype:pdata /pdb:%t.pdb /dll /out:%t.dll /entry:main /nodefaultlib \
 # RUN:   %t1.obj %t2.obj

diff  --git a/lld/test/COFF/pdb-options.test b/lld/test/COFF/pdb-options.test
index f0edc2f3bc79..70f6cbf50161 100644
--- a/lld/test/COFF/pdb-options.test
+++ b/lld/test/COFF/pdb-options.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
-# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+# RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1.obj
+# RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2.obj
 
 ; If /DEBUG is not specified, /pdb is ignored.
 # RUN: rm -f %t.pdb

diff  --git a/lld/test/COFF/pdb-procid-remapping.test b/lld/test/COFF/pdb-procid-remapping.test
index d9b4faa8c0a9..d7ea775be98e 100644
--- a/lld/test/COFF/pdb-procid-remapping.test
+++ b/lld/test/COFF/pdb-procid-remapping.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
-# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+# RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1.obj
+# RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2.obj
 # RUN: lld-link /debug /pdb:%t.pdb /dll /out:%t.dll /entry:main /nodefaultlib \
 # RUN:   %t1.obj %t2.obj
 

diff  --git a/lld/test/COFF/pdb-publics-import.test b/lld/test/COFF/pdb-publics-import.test
index 52b7d742ed09..83f087b66218 100644
--- a/lld/test/COFF/pdb-publics-import.test
+++ b/lld/test/COFF/pdb-publics-import.test
@@ -2,10 +2,10 @@ Make a DLL that exports a few functions, then make a DLL with PDBs that imports
 them. Check that the __imp_ pointer and the generated thunks appear in the
 publics stream.
 
-RUN: yaml2obj < %p/Inputs/export.yaml > %t1.obj
+RUN: yaml2obj %p/Inputs/export.yaml -o %t1.obj
 RUN: lld-link /out:%t1.dll /dll %t1.obj /implib:%t1.lib \
 RUN:   /export:exportfn1 /export:exportfn2
-RUN: yaml2obj < %p/Inputs/import.yaml > %t2.obj
+RUN: yaml2obj %p/Inputs/import.yaml -o %t2.obj
 RUN: lld-link /out:%t2.exe /pdb:%t2.pdb /pdbaltpath:test.pdb \
 RUN:   /debug /entry:main %t2.obj %t1.lib
 RUN: llvm-pdbutil dump %t2.pdb -all | FileCheck %s

diff  --git a/lld/test/COFF/pdb-same-name.test b/lld/test/COFF/pdb-same-name.test
index 52535107ca16..91e86e91dfa7 100644
--- a/lld/test/COFF/pdb-same-name.test
+++ b/lld/test/COFF/pdb-same-name.test
@@ -1,8 +1,8 @@
 # RUN: rm -rf %t1 %t2
 # RUN: mkdir %t1 %t2
-# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1/foo.obj
+# RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1/foo.obj
 # RUN: llvm-ar cru %t1/foo.lib %t1/foo.obj
-# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2/foo.obj
+# RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2/foo.obj
 # RUN: llvm-ar cru %t2/foo.lib %t2/foo.obj
 
 # RUN: rm -f %t.dll %t.pdb

diff  --git a/lld/test/COFF/pdb-tpi-aligned-records.test b/lld/test/COFF/pdb-tpi-aligned-records.test
index cb3e412a8c20..feabe5f0ab5b 100644
--- a/lld/test/COFF/pdb-tpi-aligned-records.test
+++ b/lld/test/COFF/pdb-tpi-aligned-records.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %s > %t.obj
-# RUN: yaml2obj %p/Inputs/generic.yaml > %t2.obj
+# RUN: yaml2obj %s -o %t.obj
+# RUN: yaml2obj %p/Inputs/generic.yaml -o %t2.obj
 
 # RUN: lld-link /out:%t.exe /debug /entry:main %t.obj %t2.obj /nodefaultlib
 # RUN: llvm-pdbutil dump --types --type-data %t.pdb | FileCheck %s

diff  --git a/lld/test/COFF/pdb-tpi-hash-size.test b/lld/test/COFF/pdb-tpi-hash-size.test
index 3635a5caf360..b19a6500a830 100644
--- a/lld/test/COFF/pdb-tpi-hash-size.test
+++ b/lld/test/COFF/pdb-tpi-hash-size.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
-# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+# RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1.obj
+# RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2.obj
 # RUN: rm -f %t.dll %t.pdb
 # RUN: lld-link /debug /pdb:%t.pdb /dll /out:%t.dll \
 # RUN:   /entry:main /nodefaultlib %t1.obj %t2.obj

diff  --git a/lld/test/COFF/pdb.test b/lld/test/COFF/pdb.test
index dba96508a1c0..5492fececccd 100644
--- a/lld/test/COFF/pdb.test
+++ b/lld/test/COFF/pdb.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
-# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+# RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1.obj
+# RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2.obj
 # RUN: rm -f %t.dll %t.pdb
 # RUN: lld-link /debug /pdb:%t.pdb /pdbaltpath:test.pdb /dll /out:%t.dll \
 # RUN:   /entry:main /nodefaultlib %t1.obj %t2.obj

diff  --git a/lld/test/COFF/pdbaltpath.test b/lld/test/COFF/pdbaltpath.test
index 661ad964f89c..5f886c447c73 100644
--- a/lld/test/COFF/pdbaltpath.test
+++ b/lld/test/COFF/pdbaltpath.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %p/Inputs/empty.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/empty.yaml -o %t.obj
 
 # RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:hello.pdb
 # RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix HELLO %s

diff  --git a/lld/test/COFF/pdbstream.test b/lld/test/COFF/pdbstream.test
index a44f54892d70..bca70f135bd1 100644
--- a/lld/test/COFF/pdbstream.test
+++ b/lld/test/COFF/pdbstream.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %p/Inputs/empty.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/empty.yaml -o %t.obj
 
 # RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbstream:srcsrv=%p/Inputs/stream.txt
 # RUN: llvm-pdbutil export -stream=srcsrv -out=- %t.pdb | FileCheck %s

diff  --git a/lld/test/COFF/pdbstripped.test b/lld/test/COFF/pdbstripped.test
index 573cccef2656..327133c58ff1 100644
--- a/lld/test/COFF/pdbstripped.test
+++ b/lld/test/COFF/pdbstripped.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
-# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+# RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1.obj
+# RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2.obj
 # RUN: rm -f %t.dll %t.pdb
 # RUN: lld-link /debug /pdb:%t.pdb /pdbstripped:%t2.pdb /pdbaltpath:test.pdb /dll /out:%t.dll \
 # RUN:   /entry:main /nodefaultlib %t1.obj %t2.obj 2>&1 | FileCheck %s

diff  --git a/lld/test/COFF/reloc-arm.test b/lld/test/COFF/reloc-arm.test
index 87d93ed76bf2..b7e24ca9fa9c 100644
--- a/lld/test/COFF/reloc-arm.test
+++ b/lld/test/COFF/reloc-arm.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main %t.obj
 # RUN: llvm-objdump -s %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/reloc-x64.test b/lld/test/COFF/reloc-x64.test
index 21d78428ffeb..1f91b736b099 100644
--- a/lld/test/COFF/reloc-x64.test
+++ b/lld/test/COFF/reloc-x64.test
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main %t.obj
 # RUN: llvm-objdump -d %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/reloc-x86.test b/lld/test/COFF/reloc-x86.test
index 99547d1cd145..bd5aa079c911 100644
--- a/lld/test/COFF/reloc-x86.test
+++ b/lld/test/COFF/reloc-x86.test
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link -safeseh:no /out:%t.exe /entry:main /base:0x400000 %t.obj
 # RUN: llvm-objdump -d %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/resource.test b/lld/test/COFF/resource.test
index afe4ea659671..77b7bdb29517 100644
--- a/lld/test/COFF/resource.test
+++ b/lld/test/COFF/resource.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main %t.obj %p/Inputs/resource.res
 
 # Check if the binary contains UTF-16LE string "Hello" copied from resource.res.

diff  --git a/lld/test/COFF/responsefile.test b/lld/test/COFF/responsefile.test
index 1480406d3486..1caa1c862ed1 100644
--- a/lld/test/COFF/responsefile.test
+++ b/lld/test/COFF/responsefile.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 
 # RUN: echo /out:%t.exe /entry:main %t.obj > %t.rsp
 # RUN: lld-link @%t.rsp /heap:0x3000

diff  --git a/lld/test/COFF/rsds.test b/lld/test/COFF/rsds.test
index 51c3e561594b..475249ca4056 100644
--- a/lld/test/COFF/rsds.test
+++ b/lld/test/COFF/rsds.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 
 # RUN: rm -f %t.dll %t.pdb
 # RUN: lld-link /debug /pdbaltpath:test.pdb /dll /out:%t.dll /entry:DllMain %t.obj

diff  --git a/lld/test/COFF/section-order.test b/lld/test/COFF/section-order.test
index 2e0279285b78..dc8da0234918 100644
--- a/lld/test/COFF/section-order.test
+++ b/lld/test/COFF/section-order.test
@@ -1,6 +1,6 @@
-# RUN: yaml2obj < %p/Inputs/include1a.yaml > %t1.obj
-# RUN: yaml2obj < %p/Inputs/include1b.yaml > %t2.obj
-# RUN: yaml2obj < %p/Inputs/include1c.yaml > %t3.obj
+# RUN: yaml2obj %p/Inputs/include1a.yaml -o %t1.obj
+# RUN: yaml2obj %p/Inputs/include1b.yaml -o %t2.obj
+# RUN: yaml2obj %p/Inputs/include1c.yaml -o %t3.obj
 # RUN: rm -f %t2.lib %t3.lib
 # RUN: llvm-ar cru %t2.lib %t2.obj
 # RUN: llvm-ar cru %t3.lib %t3.obj

diff  --git a/lld/test/COFF/section.test b/lld/test/COFF/section.test
index 0d70bf601019..e153a778281c 100644
--- a/lld/test/COFF/section.test
+++ b/lld/test/COFF/section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main /subsystem:console /force \
 # RUN:   /section:.foo,r %t.obj
 # RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=R %s

diff  --git a/lld/test/COFF/seh-comdat.test b/lld/test/COFF/seh-comdat.test
index d9133289ed06..f5a8f720273b 100644
--- a/lld/test/COFF/seh-comdat.test
+++ b/lld/test/COFF/seh-comdat.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj < %s > %t1.obj
-# RUN: yaml2obj < %s > %t2.obj
+# RUN: yaml2obj %s -o %t1.obj
+# RUN: yaml2obj %s -o %t2.obj
 # RUN: lld-link /out:%t.exe /subsystem:console /entry:main %t1.obj %t2.obj
 # RUN: llvm-objdump -s %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/seh.test b/lld/test/COFF/seh.test
index f2d0af76a965..2c0f063e4220 100644
--- a/lld/test/COFF/seh.test
+++ b/lld/test/COFF/seh.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /subsystem:console /entry:main %t.obj
 # RUN: llvm-objdump -s %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/sort-debug.test b/lld/test/COFF/sort-debug.test
index 708c65a23faf..d8fd7ae60564 100644
--- a/lld/test/COFF/sort-debug.test
+++ b/lld/test/COFF/sort-debug.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /debug /out:%t.exe /entry:main %t.obj
 # RUN: llvm-readobj --sections %t.exe | FileCheck %s
 # RUN: lld-link /debug:dwarf /out:%t.exe /entry:main %t.obj

diff  --git a/lld/test/COFF/stack.test b/lld/test/COFF/stack.test
index 2f2ba0d12a35..ad31ca943446 100644
--- a/lld/test/COFF/stack.test
+++ b/lld/test/COFF/stack.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 
 # RUN: lld-link /out:%t.exe /entry:main %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s

diff  --git a/lld/test/COFF/subsystem-drectve.test b/lld/test/COFF/subsystem-drectve.test
index 68630eb2d82f..ef843c8bd554 100644
--- a/lld/test/COFF/subsystem-drectve.test
+++ b/lld/test/COFF/subsystem-drectve.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link -safeseh:no /dll /noentry /out:%t.dll %t.obj
 # RUN: llvm-readobj --file-headers %t.dll | FileCheck %s
 

diff  --git a/lld/test/COFF/subsystem-inference2.test b/lld/test/COFF/subsystem-inference2.test
index 6866bb4722c0..a9d75c8af122 100644
--- a/lld/test/COFF/subsystem-inference2.test
+++ b/lld/test/COFF/subsystem-inference2.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe %t.obj 2>&1 | FileCheck -check-prefix=WARN %s
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/symtab.test b/lld/test/COFF/symtab.test
index c4cef4475475..1d47def32c8f 100644
--- a/lld/test/COFF/symtab.test
+++ b/lld/test/COFF/symtab.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /debug:dwarf /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
 # RUN: llvm-readobj --symbols %t.exe | FileCheck %s
 # RUN: lld-link /debug:dwarf /opt:noref /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib

diff  --git a/lld/test/COFF/timestamp.test b/lld/test/COFF/timestamp.test
index 3a4da7d4dd22..fbdc5788a33a 100644
--- a/lld/test/COFF/timestamp.test
+++ b/lld/test/COFF/timestamp.test
@@ -1,5 +1,5 @@
 rm %t.*.exe
-RUN: yaml2obj %p/Inputs/generic.yaml > %t.obj
+RUN: yaml2obj %p/Inputs/generic.yaml -o %t.obj
 RUN: lld-link %t.obj /debug /Brepro /entry:main /nodefaultlib /out:%t.1.exe
 RUN: lld-link %t.obj /debug /Brepro /entry:main /nodefaultlib /out:%t.2.exe
 RUN: lld-link %t.obj /debug /timestamp:0 /entry:main /nodefaultlib /out:%t.3.exe

diff  --git a/lld/test/COFF/tls.test b/lld/test/COFF/tls.test
index 0c2f1f675725..1025444bb8c9 100644
--- a/lld/test/COFF/tls.test
+++ b/lld/test/COFF/tls.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link /out:%t.exe /entry:main %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/tls32.test b/lld/test/COFF/tls32.test
index 462cec06b209..4e67c2769a7c 100644
--- a/lld/test/COFF/tls32.test
+++ b/lld/test/COFF/tls32.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lld-link -safeseh:no /out:%t.exe /entry:main %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
 

diff  --git a/lld/test/COFF/unwind.test b/lld/test/COFF/unwind.test
index b6d533a0901f..d6deb2dfabb5 100644
--- a/lld/test/COFF/unwind.test
+++ b/lld/test/COFF/unwind.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 #
 # RUN: lld-link /out:%t.exe /entry:main %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=HEADER %s

diff  --git a/lld/test/COFF/version.test b/lld/test/COFF/version.test
index 636389ee5080..3ec12e3ba74e 100644
--- a/lld/test/COFF/version.test
+++ b/lld/test/COFF/version.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
 
 # RUN: lld-link /out:%t.exe /entry:main %t.obj
 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s

diff  --git a/lld/test/COFF/weak-external.test b/lld/test/COFF/weak-external.test
index 2d650112ab62..0f64aa76f04f 100644
--- a/lld/test/COFF/weak-external.test
+++ b/lld/test/COFF/weak-external.test
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: llvm-as -o %t.lto.obj %S/Inputs/weak-external.ll
 # RUN: lld-link /out:%t1.exe /entry:g /subsystem:console %t.obj
 # RUN: lld-link /out:%t2.exe /entry:g /subsystem:console /lldmap:%t2.map %t.obj %t.lto.obj

diff  --git a/lld/test/COFF/weak-external2.test b/lld/test/COFF/weak-external2.test
index dd9662045676..6270a4e8ff19 100644
--- a/lld/test/COFF/weak-external2.test
+++ b/lld/test/COFF/weak-external2.test
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: llvm-as -o %t.lto.obj %S/Inputs/weak-external2.ll
 # RUN: lld-link /out:%t.exe /entry:g /subsystem:console %t.obj %t.lto.obj
 

diff  --git a/lld/test/COFF/weak-external3.test b/lld/test/COFF/weak-external3.test
index 8a4afdbb1b31..f981721a5f98 100644
--- a/lld/test/COFF/weak-external3.test
+++ b/lld/test/COFF/weak-external3.test
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: llvm-as -o %t.lto.obj %S/Inputs/weak-external3.ll
 # RUN: lld-link /out:%t1.exe /entry:f /subsystem:console /lldmap:%t1.map %t.lto.obj
 # RUN: FileCheck --check-prefix=CHECK1 %s < %t1.map

diff  --git a/lld/test/COFF/wholearchive.s b/lld/test/COFF/wholearchive.s
index 3592f7e9add9..e587a45244b9 100644
--- a/lld/test/COFF/wholearchive.s
+++ b/lld/test/COFF/wholearchive.s
@@ -1,6 +1,6 @@
 # REQUIRES: x86
 
-# RUN: yaml2obj < %p/Inputs/export.yaml > %t.archive.obj
+# RUN: yaml2obj %p/Inputs/export.yaml -o %t.archive.obj
 # RUN: rm -f %t.archive.lib
 # RUN: llvm-ar rcs %t.archive.lib %t.archive.obj
 # RUN: llvm-mc -triple=x86_64-windows-msvc %s -filetype=obj -o %t.main.obj

diff  --git a/lldb/test/Shell/Breakpoint/debug_addrx.test b/lldb/test/Shell/Breakpoint/debug_addrx.test
index d5813cb96686..b7a33614c277 100644
--- a/lldb/test/Shell/Breakpoint/debug_addrx.test
+++ b/lldb/test/Shell/Breakpoint/debug_addrx.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %p/Inputs/debug_addrx.yaml > %ttest
+# RUN: yaml2obj %p/Inputs/debug_addrx.yaml -o %ttest
 # RUN: lldb-test breakpoints %ttest %s | FileCheck %s
 
 # The following code and invocation were used.

diff  --git a/lldb/test/Shell/Breakpoint/debug_rnglist_basic.test b/lldb/test/Shell/Breakpoint/debug_rnglist_basic.test
index 268e4a0ed301..ea0829a2dda1 100644
--- a/lldb/test/Shell/Breakpoint/debug_rnglist_basic.test
+++ b/lldb/test/Shell/Breakpoint/debug_rnglist_basic.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %p/Inputs/debug_rnglist_basic.yaml > %ttest
+# RUN: yaml2obj %p/Inputs/debug_rnglist_basic.yaml -o %ttest
 # RUN: lldb-test breakpoints %ttest %s | FileCheck %s
 
 # The following code and invocation were used to produce yaml file,

diff  --git a/lldb/test/Shell/Breakpoint/debug_rnglist_offset_pair.test b/lldb/test/Shell/Breakpoint/debug_rnglist_offset_pair.test
index 8edf3ee4f000..a1369c51a28b 100644
--- a/lldb/test/Shell/Breakpoint/debug_rnglist_offset_pair.test
+++ b/lldb/test/Shell/Breakpoint/debug_rnglist_offset_pair.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %p/Inputs/debug_rnglist_offset_pair.yaml > %ttest
+# RUN: yaml2obj %p/Inputs/debug_rnglist_offset_pair.yaml -o %ttest
 # RUN: lldb-test breakpoints %ttest %s | FileCheck %s
 
 # The following code and invocation were used to produce asm file,

diff  --git a/lldb/test/Shell/Breakpoint/debug_rnglist_rlestartend.test b/lldb/test/Shell/Breakpoint/debug_rnglist_rlestartend.test
index 9c8beb82c529..65f6e1a66694 100644
--- a/lldb/test/Shell/Breakpoint/debug_rnglist_rlestartend.test
+++ b/lldb/test/Shell/Breakpoint/debug_rnglist_rlestartend.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %p/Inputs/debug_rnglist_rlestartend.yaml > %ttest
+# RUN: yaml2obj %p/Inputs/debug_rnglist_rlestartend.yaml -o %ttest
 # RUN: lldb-test breakpoints %ttest %s | FileCheck %s
 
 # Test shows that LDLB is able to handle DW_RLE_start_end entries properly.

diff  --git a/lldb/test/Shell/Breakpoint/debug_rnglistx_rlex.test b/lldb/test/Shell/Breakpoint/debug_rnglistx_rlex.test
index 79a80479e72c..13bca0320bd0 100644
--- a/lldb/test/Shell/Breakpoint/debug_rnglistx_rlex.test
+++ b/lldb/test/Shell/Breakpoint/debug_rnglistx_rlex.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %p/Inputs/debug_rnglistx_rlex.yaml > %ttest
+# RUN: yaml2obj %p/Inputs/debug_rnglistx_rlex.yaml -o %ttest
 # RUN: lldb-test breakpoints %ttest %s | FileCheck %s
 
 # The following code and invocation were used.

diff  --git a/lldb/test/Shell/Breakpoint/implicit_const_form_support.test b/lldb/test/Shell/Breakpoint/implicit_const_form_support.test
index 183181d2f307..6d715788576c 100644
--- a/lldb/test/Shell/Breakpoint/implicit_const_form_support.test
+++ b/lldb/test/Shell/Breakpoint/implicit_const_form_support.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %p/Inputs/implicit_const_form_support.yaml > %ttest
+# RUN: yaml2obj %p/Inputs/implicit_const_form_support.yaml -o %ttest
 # RUN: lldb-test breakpoints %ttest %s | FileCheck %s
 
 ## The intention of the test is to check that DW_FORM_implicit_const

diff  --git a/lldb/test/Shell/Breakpoint/single-file-split-dwarf.test b/lldb/test/Shell/Breakpoint/single-file-split-dwarf.test
index d0cc003bf210..5e13ce8fadfb 100644
--- a/lldb/test/Shell/Breakpoint/single-file-split-dwarf.test
+++ b/lldb/test/Shell/Breakpoint/single-file-split-dwarf.test
@@ -1,8 +1,8 @@
 # RUN: rm -rf %t.dir
 # RUN: mkdir %t.dir
 # RUN: cd %t.dir
-# RUN: yaml2obj %p/Inputs/single-file-split-dwarf.yaml > %t.dir/test
-# RUN: yaml2obj %p/Inputs/single-file-split-dwarf.o.yaml > %t.dir/test.o
+# RUN: yaml2obj %p/Inputs/single-file-split-dwarf.yaml -o %t.dir/test
+# RUN: yaml2obj %p/Inputs/single-file-split-dwarf.o.yaml -o %t.dir/test.o
 # RUN: lldb-test breakpoints %t.dir/test %s | FileCheck %s
 
 # This test checks that source code location is shown correctly

diff  --git a/lldb/test/Shell/Breakpoint/split-dwarf-5-addrbase.test b/lldb/test/Shell/Breakpoint/split-dwarf-5-addrbase.test
index 72a717d609dc..f3b9653497af 100644
--- a/lldb/test/Shell/Breakpoint/split-dwarf-5-addrbase.test
+++ b/lldb/test/Shell/Breakpoint/split-dwarf-5-addrbase.test
@@ -1,8 +1,8 @@
 # RUN: rm -rf %t.dir
 # RUN: mkdir %t.dir
 # RUN: cd %t.dir
-# RUN: yaml2obj %p/Inputs/split-dwarf-5-addrbase.dwo.yaml > %t.dir/test.dwo
-# RUN: yaml2obj %p/Inputs/split-dwarf-5-addrbase.yaml > %t.dir/test
+# RUN: yaml2obj %p/Inputs/split-dwarf-5-addrbase.dwo.yaml -o %t.dir/test.dwo
+# RUN: yaml2obj %p/Inputs/split-dwarf-5-addrbase.yaml -o %t.dir/test
 # RUN: lldb-test breakpoints %t.dir/test %s | FileCheck %s
 
 # This test checks that source code location is shown correctly

diff  --git a/lldb/test/Shell/Breakpoint/split-dwarf5-debug-stroffsets.test b/lldb/test/Shell/Breakpoint/split-dwarf5-debug-stroffsets.test
index c1418ebb0d52..3d699e2f78e0 100644
--- a/lldb/test/Shell/Breakpoint/split-dwarf5-debug-stroffsets.test
+++ b/lldb/test/Shell/Breakpoint/split-dwarf5-debug-stroffsets.test
@@ -1,9 +1,9 @@
 # RUN: rm -rf %t.dir
 # RUN: mkdir %t.dir
 # RUN: cd %t.dir
-# RUN: yaml2obj %p/Inputs/split-dwarf5-debug-stroffsets-file1.dwo.yaml > %t.dir/file1.dwo
-# RUN: yaml2obj %p/Inputs/split-dwarf5-debug-stroffsets-file2.dwo.yaml > %t.dir/file2.dwo
-# RUN: yaml2obj %p/Inputs/split-dwarf5-debug-stroffsets-main.yaml      > %t.dir/test
+# RUN: yaml2obj %p/Inputs/split-dwarf5-debug-stroffsets-file1.dwo.yaml -o %t.dir/file1.dwo
+# RUN: yaml2obj %p/Inputs/split-dwarf5-debug-stroffsets-file2.dwo.yaml -o %t.dir/file2.dwo
+# RUN: yaml2obj %p/Inputs/split-dwarf5-debug-stroffsets-main.yaml      -o %t.dir/test
 # RUN: lldb-test breakpoints %t.dir/test %s | FileCheck %s
 
 # This test checks that source code location is shown correctly

diff  --git a/lldb/test/Shell/Commands/command-disassemble-process.yaml b/lldb/test/Shell/Commands/command-disassemble-process.yaml
index 60c8ac0c569e..7003b3dabfbc 100644
--- a/lldb/test/Shell/Commands/command-disassemble-process.yaml
+++ b/lldb/test/Shell/Commands/command-disassemble-process.yaml
@@ -1,8 +1,8 @@
 # REQUIRES: x86
 
-# RUN: yaml2obj --docnum=1 -DMAIN_SIZE=8 %s > %T/command-disassemble-process.exe
-# RUN: yaml2obj --docnum=1 -DMAIN_SIZE=8000 %s > %T/command-disassemble-process.big.exe
-# RUN: yaml2obj --docnum=2 %s > %t
+# RUN: yaml2obj --docnum=1 -DMAIN_SIZE=8 %s -o %T/command-disassemble-process.exe
+# RUN: yaml2obj --docnum=1 -DMAIN_SIZE=8000 %s -o %T/command-disassemble-process.big.exe
+# RUN: yaml2obj --docnum=2 %s -o %t
 
 # RUN: %lldb -c %t %T/command-disassemble-process.exe \
 # RUN:   -o "settings set interpreter.stop-command-source-on-error false" \

diff  --git a/lldb/test/Shell/Commands/command-target-modules-dump-sections.yaml b/lldb/test/Shell/Commands/command-target-modules-dump-sections.yaml
index 57dea7e4b0ab..1fb06f651df8 100644
--- a/lldb/test/Shell/Commands/command-target-modules-dump-sections.yaml
+++ b/lldb/test/Shell/Commands/command-target-modules-dump-sections.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: %lldb %t -o "target modules dump sections" -o exit \
 # RUN:   | FileCheck --match-full-lines --strict-whitespace %s
 

diff  --git a/lldb/test/Shell/Minidump/Windows/arm-fp-unwind.test b/lldb/test/Shell/Minidump/Windows/arm-fp-unwind.test
index 35ea7c8a9de0..ed871ac544a8 100644
--- a/lldb/test/Shell/Minidump/Windows/arm-fp-unwind.test
+++ b/lldb/test/Shell/Minidump/Windows/arm-fp-unwind.test
@@ -2,8 +2,8 @@ Test that unwind plans use the frame pointer register correctly.
 
 REQUIRES: arm
 
-RUN: yaml2obj %S/Inputs/arm-fp-unwind.exe.yaml > %T/arm-fp-unwind.exe
-RUN: yaml2obj %S/Inputs/arm-fp-unwind.dmp.yaml > %T/arm-fp-unwind.dmp
+RUN: yaml2obj %S/Inputs/arm-fp-unwind.exe.yaml -o %T/arm-fp-unwind.exe
+RUN: yaml2obj %S/Inputs/arm-fp-unwind.dmp.yaml -o %T/arm-fp-unwind.dmp
 RUN: %lldb -O "settings set target.exec-search-paths %T" \
 RUN:   -c %T/arm-fp-unwind.dmp -o "image show-unwind -a 0x00c71010" -b \
 RUN:   | FileCheck %s

diff  --git a/lldb/test/Shell/Minidump/Windows/broken-unwind.test b/lldb/test/Shell/Minidump/Windows/broken-unwind.test
index b83cc60d4e4c..464624b3fc24 100644
--- a/lldb/test/Shell/Minidump/Windows/broken-unwind.test
+++ b/lldb/test/Shell/Minidump/Windows/broken-unwind.test
@@ -1,7 +1,7 @@
 Test that we can cope with broken unwind information that suggests
 reading out of bounds.
 
-RUN: yaml2obj %S/Inputs/broken-unwind.exe.yaml > %T/broken-unwind.exe
-RUN: yaml2obj %S/Inputs/broken-unwind.dmp.yaml > %T/broken-unwind.dmp
+RUN: yaml2obj %S/Inputs/broken-unwind.exe.yaml -o %T/broken-unwind.exe
+RUN: yaml2obj %S/Inputs/broken-unwind.dmp.yaml -o %T/broken-unwind.dmp
 RUN: %lldb -O "settings set target.exec-search-paths %T" \
 RUN:   -c %T/broken-unwind.dmp -o "image show-unwind -a 0xb1000" -o exit

diff  --git a/lldb/test/Shell/Minidump/Windows/find-module.test b/lldb/test/Shell/Minidump/Windows/find-module.test
index 170a1803c67d..c07a1f24fef3 100644
--- a/lldb/test/Shell/Minidump/Windows/find-module.test
+++ b/lldb/test/Shell/Minidump/Windows/find-module.test
@@ -1,8 +1,8 @@
 Test that we correctly find a PE/COFF file in our executable search path, and
 use it when opening minidumps.
 
-RUN: yaml2obj %S/Inputs/find-module.exe.yaml > %T/find-module.exe
-RUN: yaml2obj %S/Inputs/find-module.dmp.yaml > %T/find-module.dmp
+RUN: yaml2obj %S/Inputs/find-module.exe.yaml -o %T/find-module.exe
+RUN: yaml2obj %S/Inputs/find-module.dmp.yaml -o %T/find-module.dmp
 RUN: %lldb -O "settings set target.exec-search-paths %T" \
 RUN:   -c %T/find-module.dmp -o "image dump objfile" -o exit | FileCheck %s
 

diff  --git a/lldb/test/Shell/Minidump/breakpad-symbols.test b/lldb/test/Shell/Minidump/breakpad-symbols.test
index 4b3ae94c3dc2..1b57495a9d64 100644
--- a/lldb/test/Shell/Minidump/breakpad-symbols.test
+++ b/lldb/test/Shell/Minidump/breakpad-symbols.test
@@ -3,7 +3,7 @@
 #
 # The minidump input for this test taken from packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new
 
-# RUN: yaml2obj %S/Inputs/linux-x86_64.yaml > %t
+# RUN: yaml2obj %S/Inputs/linux-x86_64.yaml -o %t
 # RUN: %lldb -c %t \
 # RUN:   -o "target symbols add -s /tmp/test/linux-x86_64 %S/Inputs/linux-x86_64.syms" \
 # RUN:   -s %s -o exit | FileCheck %s

diff  --git a/lldb/test/Shell/Minidump/disassemble-no-module.yaml b/lldb/test/Shell/Minidump/disassemble-no-module.yaml
index 14637d5b7c63..64cd1145f317 100644
--- a/lldb/test/Shell/Minidump/disassemble-no-module.yaml
+++ b/lldb/test/Shell/Minidump/disassemble-no-module.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: %lldb -c %t -o bt -o disassemble 2>&1 | FileCheck %s
 
 # CHECK-LABEL: (lldb) bt

diff  --git a/lldb/test/Shell/Minidump/dump-all.test b/lldb/test/Shell/Minidump/dump-all.test
index 507c1688bb8b..a28b1a6f0734 100644
--- a/lldb/test/Shell/Minidump/dump-all.test
+++ b/lldb/test/Shell/Minidump/dump-all.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: %lldb -c %t -o 'process plugin dump --all' | \
 # RUN: FileCheck --check-prefix=CHECKDIR --check-prefix=CHECKCPU \
 # RUN: --check-prefix=CHECKSTATUS --check-prefix=CHECKLSB \

diff  --git a/lldb/test/Shell/Minidump/fb-dump.test b/lldb/test/Shell/Minidump/fb-dump.test
index 319db2f3d368..9f70ace83023 100644
--- a/lldb/test/Shell/Minidump/fb-dump.test
+++ b/lldb/test/Shell/Minidump/fb-dump.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: %lldb -c %t -o 'process plugin dump --all' | \
 # RUN:   FileCheck --check-prefix=CHECK-DIR --check-prefix=CHECK-APPDATA \
 # RUN:   --check-prefix=CHECK-BUILD --check-prefix=CHECK-VERSION \

diff  --git a/lldb/test/Shell/Minidump/memory-region-from-module.yaml b/lldb/test/Shell/Minidump/memory-region-from-module.yaml
index fb6c4a40a69b..3ebc03c23423 100644
--- a/lldb/test/Shell/Minidump/memory-region-from-module.yaml
+++ b/lldb/test/Shell/Minidump/memory-region-from-module.yaml
@@ -1,9 +1,9 @@
 # Check that memory region parsing works correctly, with a particular emphasis
 # on the boundary conditions.
 
-# RUN: yaml2obj --docnum=1 %s > %t1.dmp
-# RUN: yaml2obj --docnum=2 %s > %t2.dmp
-# RUN: yaml2obj %S/Inputs/basic-elf.yaml >%T/memory-region-from-module.exe
+# RUN: yaml2obj --docnum=1 %s -o %t1.dmp
+# RUN: yaml2obj --docnum=2 %s -o %t2.dmp
+# RUN: yaml2obj %S/Inputs/basic-elf.yaml -o %T/memory-region-from-module.exe
 
 # RUN: %lldb -b -c %t1.dmp %T/memory-region-from-module.exe \
 # RUN:   -o "memory region 0" -o "memory region 0x4000" \

diff  --git a/lldb/test/Shell/Minidump/memory-region.yaml b/lldb/test/Shell/Minidump/memory-region.yaml
index 6727d28db17a..a601de0cdf5c 100644
--- a/lldb/test/Shell/Minidump/memory-region.yaml
+++ b/lldb/test/Shell/Minidump/memory-region.yaml
@@ -1,7 +1,7 @@
 # Check that memory region parsing works correctly, with a particular emphasis
 # on the boundary conditions.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: %lldb -b -c %t \
 # RUN:   -o "memory region 0" -o "memory region 0xd9000" \
 # RUN:   -o "memory region 0xd9001" -o "memory region 0xdafff" \

diff  --git a/lldb/test/Shell/Minidump/no-process-id.yaml b/lldb/test/Shell/Minidump/no-process-id.yaml
index 3dd666a5aa1a..d55280b930a7 100644
--- a/lldb/test/Shell/Minidump/no-process-id.yaml
+++ b/lldb/test/Shell/Minidump/no-process-id.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: %lldb -c %t -o "thread list" -o "register read" -b 2>&1 | FileCheck %s
 
 # CHECK: (lldb) target create --core

diff  --git a/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-empty.yaml b/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-empty.yaml
index 9f1cb0745723..98ded6e55564 100644
--- a/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-empty.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-empty.yaml
@@ -1,7 +1,7 @@
 # Test behavior on unusual (and probably corrupt) files. Test that we drop an
 # empty PT_LOAD segment.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 #
 # CHECK-NOT: container

diff  --git a/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_INTERP.yaml b/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_INTERP.yaml
index e97afe9070ce..2190a0eca491 100644
--- a/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_INTERP.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_INTERP.yaml
@@ -1,7 +1,7 @@
 # Test that an overlapping PT_INTERP segment does not cause us to drop the
 # subsequent PT_LOAD segment.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK:        Index: 0

diff  --git a/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml b/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml
index e3261d870396..b1c5facf9ead 100644
--- a/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml
@@ -1,6 +1,6 @@
 # Overlapping PT_LOAD and PT_TLS segments should be able to exist side by side.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 # RUN: %lldb %t -o "image lookup -a 0x1000" -b | FileCheck --check-prefix=LOOKUP %s
 

diff  --git a/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap.yaml b/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap.yaml
index 1315f54e6c02..87e908b378e4 100644
--- a/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap.yaml
@@ -1,7 +1,7 @@
 # Test behavior on unusual (and probably corrupt) object files. Check that we
 # drop the second PT_LOAD segment which overlaps with the first one.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK: Type: container

diff  --git a/lldb/test/Shell/ObjectFile/ELF/PT_LOAD.yaml b/lldb/test/Shell/ObjectFile/ELF/PT_LOAD.yaml
index d673a69c8cd8..ee535fcc0b6c 100644
--- a/lldb/test/Shell/ObjectFile/ELF/PT_LOAD.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/PT_LOAD.yaml
@@ -1,6 +1,6 @@
 # Test that sections are made child-sections of the PT_LOAD segments/sections.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK:      Index: 0

diff  --git a/lldb/test/Shell/ObjectFile/ELF/PT_TLS-overlap-PT_LOAD.yaml b/lldb/test/Shell/ObjectFile/ELF/PT_TLS-overlap-PT_LOAD.yaml
index 1cacf55d5374..c4f8f2431460 100644
--- a/lldb/test/Shell/ObjectFile/ELF/PT_TLS-overlap-PT_LOAD.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/PT_TLS-overlap-PT_LOAD.yaml
@@ -1,6 +1,6 @@
 # Overlapping PT_LOAD and PT_TLS segments should be able to exist side by side.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 # RUN: %lldb %t -o "image lookup -a 0x1000" -b | FileCheck --check-prefix=LOOKUP %s
 

diff  --git a/lldb/test/Shell/ObjectFile/ELF/aarch64-relocations.yaml b/lldb/test/Shell/ObjectFile/ELF/aarch64-relocations.yaml
index b9433a0ef5a7..161c1004cce2 100644
--- a/lldb/test/Shell/ObjectFile/ELF/aarch64-relocations.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/aarch64-relocations.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file -contents %t | FileCheck %s
 
 # CHECK:      Name: .debug_info

diff  --git a/lldb/test/Shell/ObjectFile/ELF/avr-basic-info.yaml b/lldb/test/Shell/ObjectFile/ELF/avr-basic-info.yaml
index 3326ce66fa5d..c9a6df981702 100644
--- a/lldb/test/Shell/ObjectFile/ELF/avr-basic-info.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/avr-basic-info.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 # CHECK: Plugin name: elf
 # CHECK: Architecture: avr--

diff  --git a/lldb/test/Shell/ObjectFile/ELF/base-address.yaml b/lldb/test/Shell/ObjectFile/ELF/base-address.yaml
index 68f117708351..a16347f4d303 100644
--- a/lldb/test/Shell/ObjectFile/ELF/base-address.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/base-address.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK: Base VM address: 0x400000

diff  --git a/lldb/test/Shell/ObjectFile/ELF/basic-info.yaml b/lldb/test/Shell/ObjectFile/ELF/basic-info.yaml
index 0e1db67e9d5f..f9b9e10b0740 100644
--- a/lldb/test/Shell/ObjectFile/ELF/basic-info.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/basic-info.yaml
@@ -1,6 +1,6 @@
 # REQUIRES: lld
 
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: ld.lld %t.o -o %t -image-base 0x47000
 # RUN: lldb-test object-file %t | FileCheck %s
 

diff  --git a/lldb/test/Shell/ObjectFile/ELF/build-id-case.yaml b/lldb/test/Shell/ObjectFile/ELF/build-id-case.yaml
index 08366056947b..4259bc0bbbad 100644
--- a/lldb/test/Shell/ObjectFile/ELF/build-id-case.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/build-id-case.yaml
@@ -1,5 +1,5 @@
 # RUN: mkdir -p %t/.build-id/1b
-# RUN: yaml2obj %s > %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug
+# RUN: yaml2obj %s -o %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug
 # RUN: cd %t
 # RUN: llvm-objcopy --strip-all %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug %t/stripped.out
 # RUN: lldb-test object-file %t/stripped.out | FileCheck %s

diff  --git a/lldb/test/Shell/ObjectFile/ELF/compressed-sections.yaml b/lldb/test/Shell/ObjectFile/ELF/compressed-sections.yaml
index f8c31d52bb83..e252713210e6 100644
--- a/lldb/test/Shell/ObjectFile/ELF/compressed-sections.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/compressed-sections.yaml
@@ -1,5 +1,5 @@
 # REQUIRES: zlib
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file --contents %t | FileCheck %s
 --- !ELF
 FileHeader:

diff  --git a/lldb/test/Shell/ObjectFile/ELF/duplicate-section.yaml b/lldb/test/Shell/ObjectFile/ELF/duplicate-section.yaml
index 8b280d2449b0..110ca73455e1 100644
--- a/lldb/test/Shell/ObjectFile/ELF/duplicate-section.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/duplicate-section.yaml
@@ -1,5 +1,5 @@
 # RUN: mkdir -p %t/.build-id/1b
-# RUN: yaml2obj %s > %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug
+# RUN: yaml2obj %s -o %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug
 # RUN: cd %t
 # RUN: llvm-objcopy --strip-all --add-gnu-debuglink=.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug %t/stripped.out
 # RUN: lldb-test object-file %t/stripped.out | FileCheck %s

diff  --git a/lldb/test/Shell/ObjectFile/ELF/gnu-debuglink.yaml b/lldb/test/Shell/ObjectFile/ELF/gnu-debuglink.yaml
index b39b3187ae9b..3abc8cc5165f 100644
--- a/lldb/test/Shell/ObjectFile/ELF/gnu-debuglink.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/gnu-debuglink.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --strip-all --add-gnu-debuglink=%t %t %t.stripped
 # RUN: lldb-test object-file %t.stripped | FileCheck %s
 

diff  --git a/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-corrupt-xz.yaml b/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-corrupt-xz.yaml
index 938688cdfe61..e0d55fc5d7ea 100644
--- a/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-corrupt-xz.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-corrupt-xz.yaml
@@ -3,7 +3,7 @@
 # This test checks that an error occurs when a corrupted
 # .gnu_debugdata section is trying to be xz uncompressed.
 
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 
 # RUN: %lldb -b -o 'image dump symtab' %t.obj 2>&1 | FileCheck %s
 

diff  --git a/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-find-symbols.yaml b/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-find-symbols.yaml
index e6ebb0381439..e307ed0a0785 100644
--- a/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-find-symbols.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-find-symbols.yaml
@@ -1,6 +1,6 @@
 # REQUIRES: lzma
 
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 
 # RUN: %lldb -b -o 'image dump symtab' %t.obj | FileCheck %s
 

diff  --git a/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml b/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml
index 63c82baf07e2..d18243c593b0 100644
--- a/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml
@@ -3,7 +3,7 @@
 # This test checks that a warning is printed when we're trying
 # to decompress a .gnu_debugdata section when no LZMA support was compiled in.
 
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 
 # RUN: %lldb -b -o 'image dump symtab' %t.obj 2>&1 | FileCheck %s
 

diff  --git a/lldb/test/Shell/ObjectFile/ELF/netbsd-exec-8.99.30-amd64.yaml b/lldb/test/Shell/ObjectFile/ELF/netbsd-exec-8.99.30-amd64.yaml
index d8e68e9085a0..24b53592e0be 100644
--- a/lldb/test/Shell/ObjectFile/ELF/netbsd-exec-8.99.30-amd64.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/netbsd-exec-8.99.30-amd64.yaml
@@ -1,6 +1,6 @@
 # Test whether NetBSD executables are recognized correctly.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 # CHECK: Architecture: x86_64--netbsd8.99.30
 # CHECK: Type: executable

diff  --git a/lldb/test/Shell/ObjectFile/ELF/section-addresses.yaml b/lldb/test/Shell/ObjectFile/ELF/section-addresses.yaml
index 012abbf1f6d3..8f4b282bd196 100644
--- a/lldb/test/Shell/ObjectFile/ELF/section-addresses.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/section-addresses.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK-LABEL: Name: .one

diff  --git a/lldb/test/Shell/ObjectFile/ELF/section-overlap.yaml b/lldb/test/Shell/ObjectFile/ELF/section-overlap.yaml
index bfbd873be41b..dcf3055a526e 100644
--- a/lldb/test/Shell/ObjectFile/ELF/section-overlap.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/section-overlap.yaml
@@ -4,7 +4,7 @@
 # Right now the overlapping sections get dropped, but other behaviors
 # (including outright rejecting such files) are possible too.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK-NOT: .overlap1

diff  --git a/lldb/test/Shell/ObjectFile/ELF/section-permissions.yaml b/lldb/test/Shell/ObjectFile/ELF/section-permissions.yaml
index 99c2773c81b3..30bee181e9be 100644
--- a/lldb/test/Shell/ObjectFile/ELF/section-permissions.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/section-permissions.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK-LABEL: Name: .r-x

diff  --git a/lldb/test/Shell/ObjectFile/ELF/section-types-edgecases.yaml b/lldb/test/Shell/ObjectFile/ELF/section-types-edgecases.yaml
index ad1fa2d9097b..758f504ab4bd 100644
--- a/lldb/test/Shell/ObjectFile/ELF/section-types-edgecases.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/section-types-edgecases.yaml
@@ -2,7 +2,7 @@
 # here to document the existing behavior and to make sure we don't do something
 # completely crazy (like crashing).
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # The section is called .data, but it has the SHF_EXECINSTR flag set. Have

diff  --git a/lldb/test/Shell/ObjectFile/ELF/section-types.yaml b/lldb/test/Shell/ObjectFile/ELF/section-types.yaml
index 7c12a52038c2..fecb5cacc5b1 100644
--- a/lldb/test/Shell/ObjectFile/ELF/section-types.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/section-types.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK-LABEL: Name: .text

diff  --git a/lldb/test/Shell/ObjectFile/ELF/short-build-id.yaml b/lldb/test/Shell/ObjectFile/ELF/short-build-id.yaml
index 907813473920..8171cac7a79d 100644
--- a/lldb/test/Shell/ObjectFile/ELF/short-build-id.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/short-build-id.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s >%t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK: UUID: 333059A4-3CC3-D5F9

diff  --git a/lldb/test/Shell/ObjectFile/MachO/lc_build_version.yaml b/lldb/test/Shell/ObjectFile/MachO/lc_build_version.yaml
index 763525c6e5b0..576af4c225ee 100644
--- a/lldb/test/Shell/ObjectFile/MachO/lc_build_version.yaml
+++ b/lldb/test/Shell/ObjectFile/MachO/lc_build_version.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.out
+# RUN: yaml2obj %s -o %t.out
 # RUN: lldb-test symbols %t.out | FileCheck %s
 # Test that the deployment target is parsed from the load commands.
 # CHECK: x86_64-apple-macosx10.14.0

diff  --git a/lldb/test/Shell/ObjectFile/MachO/lc_build_version_notools.yaml b/lldb/test/Shell/ObjectFile/MachO/lc_build_version_notools.yaml
index f84c71aff6aa..21aebae764b0 100644
--- a/lldb/test/Shell/ObjectFile/MachO/lc_build_version_notools.yaml
+++ b/lldb/test/Shell/ObjectFile/MachO/lc_build_version_notools.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.out
+# RUN: yaml2obj %s -o %t.out
 # RUN: lldb-test symbols %t.out | FileCheck %s
 # Test that the deployment target is parsed from the load commands.
 # CHECK: x86_64-apple-macosx10.14.0

diff  --git a/lldb/test/Shell/ObjectFile/MachO/lc_version_min.yaml b/lldb/test/Shell/ObjectFile/MachO/lc_version_min.yaml
index e79107069f33..88d3f2814dd9 100644
--- a/lldb/test/Shell/ObjectFile/MachO/lc_version_min.yaml
+++ b/lldb/test/Shell/ObjectFile/MachO/lc_version_min.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.out
+# RUN: yaml2obj %s -o %t.out
 # RUN: lldb-test object-file %t.out | FileCheck %s
 
 # Test that the deployment target is parsed from the load commands.

diff  --git a/lldb/test/Shell/ObjectFile/MachO/subsections.yaml b/lldb/test/Shell/ObjectFile/MachO/subsections.yaml
index a92ef41d79fc..f402d5ddcb99 100644
--- a/lldb/test/Shell/ObjectFile/MachO/subsections.yaml
+++ b/lldb/test/Shell/ObjectFile/MachO/subsections.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 #CHECK:     Showing 2 sections

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml b/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml
index 39ef94768576..321e96bfacfa 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK: Plugin name: pe-coff

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml b/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
index d8af44253b59..dd02a378fa2b 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK: Plugin name: pe-coff

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml b/lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml
index 6b08788fb752..702774347eea 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK: Plugin name: pe-coff

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/dep-modules.yaml b/lldb/test/Shell/ObjectFile/PECOFF/dep-modules.yaml
index 12249439d8ff..1997b4aa6731 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/dep-modules.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/dep-modules.yaml
@@ -1,6 +1,6 @@
 # REQUIRES: lld
-# RUN: yaml2obj < %p/export-dllfunc.yaml > %t.export-dllfunc.obj
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %p/export-dllfunc.yaml -o %t.export-dllfunc.obj
+# RUN: yaml2obj %s -o %t.obj
 #
 # RUN: lld-link /machine:x64 /out:%t.export-dllfunc.dll /noentry /nodefaultlib /dll %t.export-dllfunc.obj /export:DllFunc
 # RUN: lld-link /out:%t.exe %t.obj %t.export-dllfunc.lib /nodefaultlib /entry:main /include:DllFunc

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml b/lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml
index 5515824e776b..24027e4a0507 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml
@@ -1,6 +1,6 @@
 # REQUIRES: arm
 
-# RUN: yaml2obj %s > %t.exe
+# RUN: yaml2obj %s -o %t.exe
 # RUN: %lldb %t.exe -o "disassemble -b -n entry" -b | FileCheck %s
 
 # CHECK: {{.*}}.exe[0x401000] <+0>: 0x0040 lsls   r0, r0, #0x1

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/export-dllfunc.yaml b/lldb/test/Shell/ObjectFile/PECOFF/export-dllfunc.yaml
index c1ada73046dc..12e4fcecd8d7 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/export-dllfunc.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/export-dllfunc.yaml
@@ -1,5 +1,5 @@
 # REQUIRES: lld
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 #
 # RUN: lld-link /machine:x64 /out:%t.dll /noentry /nodefaultlib /debug /dll %t.obj /export:DllFunc
 #

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml b/lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml
index 795672786684..389261ad9b10 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml
@@ -1,7 +1,7 @@
 ## Test that errors in loading an exe doesn't crash lldb.
 ## The ExportTable RelativeVirtualAddress is out of bounds here.
 
-# RUN: yaml2obj %s > %t.exe
+# RUN: yaml2obj %s -o %t.exe
 # RUN: %lldb %t.exe 2>&1 | FileCheck %s
 
 # CHECK: error: '{{.*}}' doesn't contain any {{.*}} platform architectures

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml b/lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml
index caf955500e09..9bc64a3178c7 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK-LABEL: Name: .text

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/sections-names.yaml b/lldb/test/Shell/ObjectFile/PECOFF/sections-names.yaml
index b62c0bc0426f..e9e752de549f 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/sections-names.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/sections-names.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK: Name: .text{{$}}

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/sections.yaml b/lldb/test/Shell/ObjectFile/PECOFF/sections.yaml
index d41427eed0aa..1da37a671ecc 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/sections.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/sections.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml b/lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml
index 9dbc93b9b918..8bda82c6b4a0 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test symbols %t | FileCheck %s
 
 ## The .file symbol isn't checked, but is included to test that the symbol

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/uuid.yaml b/lldb/test/Shell/ObjectFile/PECOFF/uuid.yaml
index 4f371089167f..0157fe79224c 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/uuid.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/uuid.yaml
@@ -1,5 +1,5 @@
 # REQUIRES: lld
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: lldb-test object-file %t.obj | FileCheck %s
 
 # CHECK-DAG: UUID: 14B292E0-D81A-B4F1-4C4C-44205044422E-00000001

diff  --git a/lldb/test/Shell/ObjectFile/wasm/basic.yaml b/lldb/test/Shell/ObjectFile/wasm/basic.yaml
index 79b6c73bcbe4..16397735c5fe 100644
--- a/lldb/test/Shell/ObjectFile/wasm/basic.yaml
+++ b/lldb/test/Shell/ObjectFile/wasm/basic.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK: Plugin name: wasm

diff  --git a/lldb/test/Shell/ObjectFile/wasm/embedded-debug-sections.yaml b/lldb/test/Shell/ObjectFile/wasm/embedded-debug-sections.yaml
index 537c1553a9d7..f3edf18770b1 100644
--- a/lldb/test/Shell/ObjectFile/wasm/embedded-debug-sections.yaml
+++ b/lldb/test/Shell/ObjectFile/wasm/embedded-debug-sections.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK: Plugin name: wasm

diff  --git a/lldb/test/Shell/ObjectFile/wasm/stripped-debug-sections.yaml b/lldb/test/Shell/ObjectFile/wasm/stripped-debug-sections.yaml
index 412fb0aa9fd7..6530cab4ee0d 100644
--- a/lldb/test/Shell/ObjectFile/wasm/stripped-debug-sections.yaml
+++ b/lldb/test/Shell/ObjectFile/wasm/stripped-debug-sections.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK: Plugin name: wasm

diff  --git a/lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml b/lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml
index 4bfdd5ae3cb1..a1461c33671d 100644
--- a/lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml
+++ b/lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml
@@ -1,8 +1,8 @@
 # RUN: rm -rf %t
 # RUN: mkdir %t
 # RUN: cd %t
-# RUN: yaml2obj --docnum=1 %s > test.wasm
-# RUN: yaml2obj --docnum=2 %s > test_sym.wasm
+# RUN: yaml2obj --docnum=1 %s -o test.wasm
+# RUN: yaml2obj --docnum=2 %s -o test_sym.wasm
 # RUN: lldb-test object-file test.wasm | FileCheck %s
 
 # This test checks that SymbolVendorWasm correctly loads DWARF debug sections

diff  --git a/lldb/test/Shell/Process/Windows/launch_failure.yaml b/lldb/test/Shell/Process/Windows/launch_failure.yaml
index 88cb0edd9f90..bb9811fb6443 100644
--- a/lldb/test/Shell/Process/Windows/launch_failure.yaml
+++ b/lldb/test/Shell/Process/Windows/launch_failure.yaml
@@ -4,7 +4,7 @@
 # REQUIRES: system-windows
 # REQUIRES: native && target-x86_64
 
-# RUN: yaml2obj %s > %t.exe
+# RUN: yaml2obj %s -o %t.exe
 # RUN: %lldb %t.exe -o run 2>&1 | FileCheck %s
 
 # CHECK: error: unknown error

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/line-table-discontinuous-file-ids.test b/lldb/test/Shell/SymbolFile/Breakpad/line-table-discontinuous-file-ids.test
index 3b48f4f3c5a5..0780cab7b239 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/line-table-discontinuous-file-ids.test
+++ b/lldb/test/Shell/SymbolFile/Breakpad/line-table-discontinuous-file-ids.test
@@ -1,6 +1,6 @@
 # Test that we handle files which has gaps in the FILE record IDs.
 
-# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/line-table-discontinuous-file-ids.out
+# RUN: yaml2obj %S/Inputs/basic-elf.yaml -o %T/line-table-discontinuous-file-ids.out
 # RUN: %lldb %T/line-table-discontinuous-file-ids.out \
 # RUN:   -o "target symbols add -s line-table-discontinuous-file-ids.out %S/Inputs/line-table-discontinuous-file-ids.syms" \
 # RUN:   -s %s -o exit | FileCheck %s

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/line-table-edgecases.test b/lldb/test/Shell/SymbolFile/Breakpad/line-table-edgecases.test
index 3a097725a972..805f28034b87 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/line-table-edgecases.test
+++ b/lldb/test/Shell/SymbolFile/Breakpad/line-table-edgecases.test
@@ -2,7 +2,7 @@
 # input contains a LINE record which does not belong to any function as well as
 # a FUNC record without any LINE records.
 
-# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/line-table-edgecases.out
+# RUN: yaml2obj %S/Inputs/basic-elf.yaml -o %T/line-table-edgecases.out
 # RUN: %lldb %T/line-table-edgecases.out \
 # RUN:   -o "target symbols add -s line-table-edgecases.out %S/Inputs/line-table-edgecases.syms" \
 # RUN:   -s %s -o exit | FileCheck %s

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/line-table-missing-file.test b/lldb/test/Shell/SymbolFile/Breakpad/line-table-missing-file.test
index 0c0fb3f8ea88..1018d02c9894 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/line-table-missing-file.test
+++ b/lldb/test/Shell/SymbolFile/Breakpad/line-table-missing-file.test
@@ -3,7 +3,7 @@
 # Right now, "something reasonable" means creating a line entry with an empty
 # file.
 
-# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/line-table-missing-file.out
+# RUN: yaml2obj %S/Inputs/basic-elf.yaml -o %T/line-table-missing-file.out
 # RUN: %lldb %T/line-table-missing-file.out \
 # RUN:   -o "target symbols add -s line-table-missing-file.out %S/Inputs/line-table-missing-file.syms" \
 # RUN:   -s %s -o exit | FileCheck %s

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/line-table-mixed-path-styles.test b/lldb/test/Shell/SymbolFile/Breakpad/line-table-mixed-path-styles.test
index 617b5eb6a9f7..cb3349ff193b 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/line-table-mixed-path-styles.test
+++ b/lldb/test/Shell/SymbolFile/Breakpad/line-table-mixed-path-styles.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/line-table-mixed-path-styles.out
+# RUN: yaml2obj %S/Inputs/basic-elf.yaml -o %T/line-table-mixed-path-styles.out
 # RUN: %lldb %T/line-table-mixed-path-styles.out \
 # RUN:   -o "target symbols add -s line-table-mixed-path-styles.out %S/Inputs/line-table-mixed-path-styles.syms" \
 # RUN:   -s %s -o exit | FileCheck %s

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/line-table.test b/lldb/test/Shell/SymbolFile/Breakpad/line-table.test
index f5661cf7ee91..16ef2a43b65a 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/line-table.test
+++ b/lldb/test/Shell/SymbolFile/Breakpad/line-table.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/line-table.out
+# RUN: yaml2obj %S/Inputs/basic-elf.yaml -o %T/line-table.out
 # RUN: %lldb %T/line-table.out -o "target symbols add -s line-table.out %S/Inputs/line-table.syms" \
 # RUN:   -s %s -o exit | FileCheck %s
 

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-arm.yaml b/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-arm.yaml
index 61a33e7ba7fc..b4408942a4c1 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-arm.yaml
+++ b/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-arm.yaml
@@ -1,6 +1,6 @@
 # REQUIRES: arm
 
-# RUN: yaml2obj %s >%t
+# RUN: yaml2obj %s -o %t
 # RUN: %lldb -c %t -o "target symbols add %S/Inputs/stack-cfi-arm.syms" \
 # RUN:   -o "image show-unwind -n func0" -b | FileCheck %s
 

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-parsing.test b/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-parsing.test
index a6e29290854a..dd98939aa82e 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-parsing.test
+++ b/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-parsing.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %S/Inputs/stack-cfi-parsing.yaml > %t
+# RUN: yaml2obj %S/Inputs/stack-cfi-parsing.yaml -o %t
 # RUN: %lldb -c %t -o "target symbols add %S/Inputs/stack-cfi-parsing.syms" \
 # RUN:   -s %s -b | FileCheck %s
 

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/symtab-macho.test b/lldb/test/Shell/SymbolFile/Breakpad/symtab-macho.test
index 59538649d8fa..ebfc31cc40d2 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/symtab-macho.test
+++ b/lldb/test/Shell/SymbolFile/Breakpad/symtab-macho.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %S/Inputs/basic-macho.yaml > %T/symtab-macho.out
+# RUN: yaml2obj %S/Inputs/basic-macho.yaml -o %T/symtab-macho.out
 # RUN: %lldb %T/symtab-macho.out -o "target symbols add %S/Inputs/symtab-macho.syms" \
 # RUN:   -s %s | FileCheck %s
 

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/symtab.test b/lldb/test/Shell/SymbolFile/Breakpad/symtab.test
index 65bf9517461f..a02d94c30aa3 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/symtab.test
+++ b/lldb/test/Shell/SymbolFile/Breakpad/symtab.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/symtab.out
+# RUN: yaml2obj %S/Inputs/basic-elf.yaml -o %T/symtab.out
 # RUN: %lldb %T/symtab.out -o "target symbols add -s symtab.out %S/Inputs/symtab.syms" \
 # RUN:   -s %s | FileCheck %s
 

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-raSearch.test b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-raSearch.test
index 93ea3ce02941..1e280738900a 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-raSearch.test
+++ b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-raSearch.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %S/Inputs/unwind-via-stack-win.yaml > %t
+# RUN: yaml2obj %S/Inputs/unwind-via-stack-win.yaml -o %t
 # RUN: %lldb -c %t \
 # RUN:   -o "target symbols add %S/Inputs/unwind-via-raSearch.syms" \
 # RUN:   -s %s -b | FileCheck %s

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-cfi.test b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-cfi.test
index 29cf130694e6..62d0ef5ce598 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-cfi.test
+++ b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-cfi.test
@@ -1,6 +1,6 @@
 # REQUIRES: x86
 
-# RUN: yaml2obj %S/Inputs/unwind-via-stack-cfi.yaml > %t
+# RUN: yaml2obj %S/Inputs/unwind-via-stack-cfi.yaml -o %t
 # RUN: %lldb -c %t -o "target symbols add %S/Inputs/unwind-via-stack-cfi.syms" \
 # RUN:   -s %s -b | FileCheck %s
 

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win-no-memory-info.yaml b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win-no-memory-info.yaml
index e57fcdf71533..8309c9e105e0 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win-no-memory-info.yaml
+++ b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win-no-memory-info.yaml
@@ -1,5 +1,5 @@
-# RUN: yaml2obj --docnum=1 %s > %t.dmp
-# RUN: yaml2obj --docnum=2 %s > %T/unwind-via-stack-win-no-memory-info.exe
+# RUN: yaml2obj --docnum=1 %s -o %t.dmp
+# RUN: yaml2obj --docnum=2 %s -o %T/unwind-via-stack-win-no-memory-info.exe
 # RUN: %lldb -c %t.dmp %T/unwind-via-stack-win-no-memory-info.exe \
 # RUN:   -o "target symbols add %S/Inputs/unwind-via-raSearch.syms" \
 # RUN:   -o "thread backtrace" -b | FileCheck %s

diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win.test b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win.test
index e95367a213f8..2e4ac58c9bea 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win.test
+++ b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win.test
@@ -1,6 +1,6 @@
 # REQUIRES: x86
 
-# RUN: yaml2obj %S/Inputs/unwind-via-stack-win.yaml > %t
+# RUN: yaml2obj %S/Inputs/unwind-via-stack-win.yaml -o %t
 # RUN: %lldb -c %t \
 # RUN:   -o "target symbols add %S/Inputs/unwind-via-stack-win.syms" \
 # RUN:   -s %s -b | FileCheck %s

diff  --git a/lldb/test/Shell/SymbolFile/DWARF/debug_loc-aslr.s b/lldb/test/Shell/SymbolFile/DWARF/debug_loc-aslr.s
index bdf59261aa8e..621ffecba9ca 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/debug_loc-aslr.s
+++ b/lldb/test/Shell/SymbolFile/DWARF/debug_loc-aslr.s
@@ -4,7 +4,7 @@
 
 # REQUIRES: x86
 
-# RUN: yaml2obj %S/Inputs/debug_loc-aslr.yaml >%t.dmp
+# RUN: yaml2obj %S/Inputs/debug_loc-aslr.yaml -o %t.dmp
 # RUN: llvm-mc --triple=x86_64-pc-linux --filetype=obj %s >%t.o
 # RUN: %lldb -c %t.dmp -o "image add %t.o" \
 # RUN:   -o "image load --file %t.o --slide 0x470000" \


        


More information about the llvm-commits mailing list