[llvm] 55c81d4 - [test] Use yaml2obj -o %t instead of > %t

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 17:20:25 PST 2020


Author: Fangrui Song
Date: 2020-01-21T17:20:18-08:00
New Revision: 55c81d4282c5da0189711261a11537bc8a7fe85c

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

LOG: [test] Use yaml2obj -o %t instead of > %t

To improve consistency and avoid unneeded shell feature (output
redirection).

While here, make other changes to improve consistency

--docnum 1 => --docnum=1
-docnum=x => --docnum=x

Added: 
    

Modified: 
    llvm/test/DebugInfo/PDB/annotation.test
    llvm/test/DebugInfo/PDB/obj-globalhash.test
    llvm/test/DebugInfo/PDB/using-namespace.test
    llvm/test/DebugInfo/invalid-relocations.test
    llvm/test/DebugInfo/precomp.test
    llvm/test/Object/AArch64/yaml2obj-elf-aarch64-rel.yaml
    llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml
    llvm/test/Object/AMDGPU/elf-header-flags-sram-ecc.yaml
    llvm/test/Object/AMDGPU/elf-header-flags-xnack.yaml
    llvm/test/Object/AMDGPU/elf-header-osabi.yaml
    llvm/test/Object/AMDGPU/elf32-unknown.yaml
    llvm/test/Object/AMDGPU/elf64-relocs.yaml
    llvm/test/Object/AMDGPU/elf64-unknown.yaml
    llvm/test/Object/Lanai/yaml2obj-elf-lanai-rel.yaml
    llvm/test/Object/Mips/abi-flags.yaml
    llvm/test/Object/Mips/elf-mips64-rel.yaml
    llvm/test/Object/RISCV/elf-flags.yaml
    llvm/test/Object/X86/objdump-disassembly-inline-relocations.test
    llvm/test/Object/X86/objdump-trivial-object.test
    llvm/test/Object/X86/yaml-elf-x86-rel-broken.yaml
    llvm/test/Object/X86/yaml2obj-elf-x86-rel.yaml
    llvm/test/Object/archive-format.test
    llvm/test/Object/archive-symtab.test
    llvm/test/Object/nm-error.test
    llvm/test/Object/nm-shared-object.test
    llvm/test/Object/nm-trivial-object.test
    llvm/test/Object/obj2yaml.test
    llvm/test/Object/objdump-relocations.test
    llvm/test/Object/objdump-section-content.test
    llvm/test/Object/objdump-sectionheaders.test
    llvm/test/Object/objdump-symbol-table.test
    llvm/test/Object/readobj-absent.test
    llvm/test/Object/wasm-invalid-file.yaml
    llvm/test/ObjectYAML/CodeView/sections.yaml
    llvm/test/ObjectYAML/MachO/section_data.yaml
    llvm/test/tools/llvm-elfabi/binary-read-add-soname.test
    llvm/test/tools/llvm-elfabi/binary-read-arch.test
    llvm/test/tools/llvm-elfabi/binary-read-bad-soname.test
    llvm/test/tools/llvm-elfabi/binary-read-bad-vaddr.test
    llvm/test/tools/llvm-elfabi/binary-read-neededlibs-bad-offset.test
    llvm/test/tools/llvm-elfabi/binary-read-no-dt-strsz.test
    llvm/test/tools/llvm-elfabi/binary-read-no-dt-strtab.test
    llvm/test/tools/llvm-elfabi/binary-read-no-dynamic.test
    llvm/test/tools/llvm-elfabi/binary-read-replace-soname.test
    llvm/test/tools/llvm-elfabi/binary-read-soname-no-null.test
    llvm/test/tools/llvm-elfabi/binary-read-soname.test
    llvm/test/tools/llvm-lipo/archs-macho-binary-unknown.test
    llvm/test/tools/llvm-lipo/archs-macho-binary.test
    llvm/test/tools/llvm-lipo/archs-universal-binary-arm.test
    llvm/test/tools/llvm-lipo/archs-universal-binary-unknown.test
    llvm/test/tools/llvm-lipo/archs-universal-binary-x86.test
    llvm/test/tools/llvm-lipo/create-arch.test
    llvm/test/tools/llvm-lipo/create-archive-input.test
    llvm/test/tools/llvm-lipo/create-compute-alignment.test
    llvm/test/tools/llvm-lipo/create-default-alignment.test
    llvm/test/tools/llvm-lipo/create-executable.test
    llvm/test/tools/llvm-lipo/create-invalid-input.test
    llvm/test/tools/llvm-lipo/extract.test
    llvm/test/tools/llvm-lipo/info-invalid.test
    llvm/test/tools/llvm-lipo/info.test
    llvm/test/tools/llvm-lipo/replace-invalid-input.test
    llvm/test/tools/llvm-lipo/replace-universal-binary.test
    llvm/test/tools/llvm-lipo/segalign-invalid-input.test
    llvm/test/tools/llvm-lipo/segalign.test
    llvm/test/tools/llvm-lipo/thin-executable-universal-binary.test
    llvm/test/tools/llvm-lipo/thin-macho-binary.test
    llvm/test/tools/llvm-lipo/thin-universal-binary.test
    llvm/test/tools/llvm-lipo/verify-arch-macho-binary.test
    llvm/test/tools/llvm-lipo/verify-arch-universal-binary.test
    llvm/test/tools/llvm-nm/AArch64/special-syms.test
    llvm/test/tools/llvm-nm/X86/nm-no-symbols-local-only.yaml
    llvm/test/tools/llvm-nm/X86/nm-no-symbols.test
    llvm/test/tools/llvm-nm/X86/portability.test
    llvm/test/tools/llvm-nm/debug-syms.test
    llvm/test/tools/llvm-nm/format-sysv-layout.test
    llvm/test/tools/llvm-nm/format-sysv-section.test
    llvm/test/tools/llvm-nm/format-sysv-type.test
    llvm/test/tools/llvm-nm/no-sort.test
    llvm/test/tools/llvm-nm/numeric-sort.test
    llvm/test/tools/llvm-nm/undefined-only.test
    llvm/test/tools/llvm-objcopy/COFF/add-gnu-debuglink.test
    llvm/test/tools/llvm-objcopy/COFF/add-section.test
    llvm/test/tools/llvm-objcopy/COFF/basic-copy.test
    llvm/test/tools/llvm-objcopy/COFF/discard-all.test
    llvm/test/tools/llvm-objcopy/COFF/only-keep-debug.test
    llvm/test/tools/llvm-objcopy/COFF/only-section.test
    llvm/test/tools/llvm-objcopy/COFF/patch-debug-dir.test
    llvm/test/tools/llvm-objcopy/COFF/remove-section.test
    llvm/test/tools/llvm-objcopy/COFF/strip-all.test
    llvm/test/tools/llvm-objcopy/COFF/strip-debug.test
    llvm/test/tools/llvm-objcopy/COFF/strip-reloc-symbol.test
    llvm/test/tools/llvm-objcopy/COFF/strip-symbol.test
    llvm/test/tools/llvm-objcopy/COFF/strip-unneeded.test
    llvm/test/tools/llvm-objcopy/COFF/weak-external.test
    llvm/test/tools/llvm-objcopy/ELF/abs-symbol.test
    llvm/test/tools/llvm-objcopy/ELF/add-gnu-debuglink.test
    llvm/test/tools/llvm-objcopy/ELF/add-note.test
    llvm/test/tools/llvm-objcopy/ELF/add-section-remove.test
    llvm/test/tools/llvm-objcopy/ELF/add-section-special.test
    llvm/test/tools/llvm-objcopy/ELF/add-section.test
    llvm/test/tools/llvm-objcopy/ELF/armexidx-link.test
    llvm/test/tools/llvm-objcopy/ELF/bad-build-id.test
    llvm/test/tools/llvm-objcopy/ELF/bad-output-format.test
    llvm/test/tools/llvm-objcopy/ELF/basic-archive-copy.test
    llvm/test/tools/llvm-objcopy/ELF/basic-copy.test
    llvm/test/tools/llvm-objcopy/ELF/basic-keep.test
    llvm/test/tools/llvm-objcopy/ELF/basic-only-section.test
    llvm/test/tools/llvm-objcopy/ELF/basic-relocations.test
    llvm/test/tools/llvm-objcopy/ELF/build-id-link-dir.test
    llvm/test/tools/llvm-objcopy/ELF/cannot-delete-dest.test
    llvm/test/tools/llvm-objcopy/ELF/common-symbol.test
    llvm/test/tools/llvm-objcopy/ELF/copy-osabi.test
    llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
    llvm/test/tools/llvm-objcopy/ELF/cross-arch-sections-symbols.test
    llvm/test/tools/llvm-objcopy/ELF/deterministic-archive.test
    llvm/test/tools/llvm-objcopy/ELF/discard-all.test
    llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test
    llvm/test/tools/llvm-objcopy/ELF/discard-locals.test
    llvm/test/tools/llvm-objcopy/ELF/discard-mix-local-and-all.test
    llvm/test/tools/llvm-objcopy/ELF/dump-section.test
    llvm/test/tools/llvm-objcopy/ELF/dynamic-relocations.test
    llvm/test/tools/llvm-objcopy/ELF/dynrelocsec-remove-shinfo-reference.test
    llvm/test/tools/llvm-objcopy/ELF/dynrelocsec-remove-shlink-reference.test
    llvm/test/tools/llvm-objcopy/ELF/dynstr.test
    llvm/test/tools/llvm-objcopy/ELF/elf32be.test
    llvm/test/tools/llvm-objcopy/ELF/elf32le.test
    llvm/test/tools/llvm-objcopy/ELF/elf64be.test
    llvm/test/tools/llvm-objcopy/ELF/empty-section.test
    llvm/test/tools/llvm-objcopy/ELF/explicit-keep-remove.test
    llvm/test/tools/llvm-objcopy/ELF/explicit-only-section-remove.test
    llvm/test/tools/llvm-objcopy/ELF/fail-no-output-directory.test
    llvm/test/tools/llvm-objcopy/ELF/globalize.test
    llvm/test/tools/llvm-objcopy/ELF/group-addr-misaligned.test
    llvm/test/tools/llvm-objcopy/ELF/group-big-endian.test
    llvm/test/tools/llvm-objcopy/ELF/group-reorder.test
    llvm/test/tools/llvm-objcopy/ELF/group-unchanged.test
    llvm/test/tools/llvm-objcopy/ELF/group.test
    llvm/test/tools/llvm-objcopy/ELF/hexagon-unsupported-on-x86.test
    llvm/test/tools/llvm-objcopy/ELF/keep-file-symbols.test
    llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test
    llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols.test
    llvm/test/tools/llvm-objcopy/ELF/keep-many.test
    llvm/test/tools/llvm-objcopy/ELF/keep-only-section.test
    llvm/test/tools/llvm-objcopy/ELF/keep-symbol-remove-section.test
    llvm/test/tools/llvm-objcopy/ELF/keep-symbol.test
    llvm/test/tools/llvm-objcopy/ELF/localize-hidden.test
    llvm/test/tools/llvm-objcopy/ELF/localize.test
    llvm/test/tools/llvm-objcopy/ELF/no-build-id-no-notes.test
    llvm/test/tools/llvm-objcopy/ELF/no-build-id.test
    llvm/test/tools/llvm-objcopy/ELF/no-symbol-relocation.test
    llvm/test/tools/llvm-objcopy/ELF/null-symbol.test
    llvm/test/tools/llvm-objcopy/ELF/only-section-many.test
    llvm/test/tools/llvm-objcopy/ELF/only-section-remove-strtab.test
    llvm/test/tools/llvm-objcopy/ELF/only-section-strip-non-alloc.test
    llvm/test/tools/llvm-objcopy/ELF/prefix-alloc-sections-dynrelocsec.test
    llvm/test/tools/llvm-objcopy/ELF/prefix-alloc-sections.test
    llvm/test/tools/llvm-objcopy/ELF/prefix-symbols.test
    llvm/test/tools/llvm-objcopy/ELF/redefine-symbol.test
    llvm/test/tools/llvm-objcopy/ELF/regex.test
    llvm/test/tools/llvm-objcopy/ELF/reloc-error-remove-symtab.test
    llvm/test/tools/llvm-objcopy/ELF/reloc-no-symtab.test
    llvm/test/tools/llvm-objcopy/ELF/relocatable-phdr.test
    llvm/test/tools/llvm-objcopy/ELF/remove-multiple-sections.test
    llvm/test/tools/llvm-objcopy/ELF/remove-section-with-symbol.test
    llvm/test/tools/llvm-objcopy/ELF/remove-section.test
    llvm/test/tools/llvm-objcopy/ELF/remove-shstrtab-error.test
    llvm/test/tools/llvm-objcopy/ELF/remove-symtab.test
    llvm/test/tools/llvm-objcopy/ELF/rename-section-and-prefix-alloc-sections.test
    llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-osproc-mask.test
    llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-preserved.test
    llvm/test/tools/llvm-objcopy/ELF/rename-section-flag.test
    llvm/test/tools/llvm-objcopy/ELF/rename-section-multiple.test
    llvm/test/tools/llvm-objcopy/ELF/rename-section.test
    llvm/test/tools/llvm-objcopy/ELF/section-index-unsupported.test
    llvm/test/tools/llvm-objcopy/ELF/set-section-flags-and-rename.test
    llvm/test/tools/llvm-objcopy/ELF/set-section-flags-multiple.test
    llvm/test/tools/llvm-objcopy/ELF/set-section-flags.test
    llvm/test/tools/llvm-objcopy/ELF/shstrtab-optimize.test
    llvm/test/tools/llvm-objcopy/ELF/strip-all-and-keep-symbol.test
    llvm/test/tools/llvm-objcopy/ELF/strip-all-and-remove.test
    llvm/test/tools/llvm-objcopy/ELF/strip-all-gnu.test
    llvm/test/tools/llvm-objcopy/ELF/strip-all.test
    llvm/test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test
    llvm/test/tools/llvm-objcopy/ELF/strip-debug.test
    llvm/test/tools/llvm-objcopy/ELF/strip-group-symbol.test
    llvm/test/tools/llvm-objcopy/ELF/strip-multiple-files.test
    llvm/test/tools/llvm-objcopy/ELF/strip-non-alloc.test
    llvm/test/tools/llvm-objcopy/ELF/strip-preserve-arm-attributes.test
    llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
    llvm/test/tools/llvm-objcopy/ELF/strip-preserve-mtime.test
    llvm/test/tools/llvm-objcopy/ELF/strip-reloc-symbol.test
    llvm/test/tools/llvm-objcopy/ELF/strip-section-err.test
    llvm/test/tools/llvm-objcopy/ELF/strip-sections-keep.test
    llvm/test/tools/llvm-objcopy/ELF/strip-sections-only-section.test
    llvm/test/tools/llvm-objcopy/ELF/strip-sections.test
    llvm/test/tools/llvm-objcopy/ELF/strip-symbol-and-relocation.test
    llvm/test/tools/llvm-objcopy/ELF/strip-symbol.test
    llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-all-symbols.test
    llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-remove-debug-keep-link.test
    llvm/test/tools/llvm-objcopy/ELF/strip-unneeded.test
    llvm/test/tools/llvm-objcopy/ELF/strtab-optimize.test
    llvm/test/tools/llvm-objcopy/ELF/symbol-copy.test
    llvm/test/tools/llvm-objcopy/ELF/symbol-empty-name.test
    llvm/test/tools/llvm-objcopy/ELF/symtab-error-on-remove-strtab.test
    llvm/test/tools/llvm-objcopy/ELF/symtab-link.test
    llvm/test/tools/llvm-objcopy/ELF/weaken-all.test
    llvm/test/tools/llvm-objcopy/ELF/weaken.test
    llvm/test/tools/llvm-objcopy/ELF/wildcard-flags.test
    llvm/test/tools/llvm-objcopy/ELF/wildcard-syntax.test
    llvm/test/tools/llvm-objcopy/MachO/basic-big-endian-32-copy.test
    llvm/test/tools/llvm-objcopy/MachO/basic-big-endian-64-copy.test
    llvm/test/tools/llvm-objcopy/MachO/basic-executable-copy.test
    llvm/test/tools/llvm-objcopy/MachO/basic-little-endian-32-copy.test
    llvm/test/tools/llvm-objcopy/MachO/basic-little-endian-64-copy.test
    llvm/test/tools/llvm-objcopy/MachO/install-name-tool-add-rpath.test
    llvm/test/tools/llvm-objcopy/MachO/min-version-load-commands.test
    llvm/test/tools/llvm-objcopy/MachO/only-section.test
    llvm/test/tools/llvm-objcopy/MachO/remove-section.test
    llvm/test/tools/llvm-objcopy/MachO/strip-all.test
    llvm/test/tools/llvm-objcopy/redefine-symbols.test
    llvm/test/tools/llvm-objdump/X86/adjust-vma.test
    llvm/test/tools/llvm-objdump/X86/disassemble-demangle.test
    llvm/test/tools/llvm-objdump/X86/disassemble-zeroes-relocations.test
    llvm/test/tools/llvm-objdump/X86/elf-disassemble-bss.test
    llvm/test/tools/llvm-objdump/X86/elf-disassemble-relocs.test
    llvm/test/tools/llvm-objdump/X86/output-ordering.test
    llvm/test/tools/llvm-objdump/X86/phdrs-lma.test
    llvm/test/tools/llvm-objdump/X86/phdrs-lma2.test
    llvm/test/tools/llvm-objdump/elf-dynamic-section.test
    llvm/test/tools/llvm-objdump/file-headers-coff.test
    llvm/test/tools/llvm-objdump/file-headers-elf.test
    llvm/test/tools/llvm-objdump/file-headers-pe.test
    llvm/test/tools/llvm-objdump/full-contents.test
    llvm/test/tools/llvm-objdump/macho-bad-dysymtab.test
    llvm/test/tools/llvm-objdump/non-archive-object.test
    llvm/test/tools/llvm-objdump/private-headers-no-dynamic-segment.test
    llvm/test/tools/llvm-objdump/private-headers-no-dynamic.test
    llvm/test/tools/llvm-objdump/relocations-elf.test
    llvm/test/tools/llvm-objdump/symbol-table-elf.test
    llvm/test/tools/llvm-objdump/verdef-elf.test
    llvm/test/tools/llvm-objdump/verneed-elf.test
    llvm/test/tools/llvm-objdump/verneed-wrong-info.test
    llvm/test/tools/llvm-objdump/warn-on-out-of-range-start-stop-address.test
    llvm/test/tools/llvm-readobj/COFF/unwind-arm64-image.yaml
    llvm/test/tools/llvm-readobj/COFF/unwind-x86_64-image.yaml
    llvm/test/tools/llvm-readobj/ELF/demangle.test
    llvm/test/tools/llvm-readobj/ELF/gnu-note-size.test
    llvm/test/tools/llvm-readobj/ELF/gnu-notes.test
    llvm/test/tools/llvm-readobj/ELF/note-amdgpu.test
    llvm/test/tools/llvm-readobj/ELF/note-core-ntfile.test
    llvm/test/tools/llvm-readobj/ELF/note-core.test
    llvm/test/tools/llvm-readobj/ELF/reloc-symbol-with-versioning.test
    llvm/test/tools/llvm-readobj/ELF/stack-sizes.test
    llvm/test/tools/llvm-readobj/ELF/string-dump.test
    llvm/test/tools/llvm-readobj/ELF/symbol-64bit.test
    llvm/test/tools/llvm-readobj/ELF/symbol-binding.test
    llvm/test/tools/llvm-readobj/ELF/symbol-shndx.test
    llvm/test/tools/llvm-readobj/ELF/symbol-types.test
    llvm/test/tools/llvm-readobj/ELF/symbol-visibility.test
    llvm/test/tools/llvm-readobj/ELF/unwind.test
    llvm/test/tools/llvm-readobj/MachO/sections.test
    llvm/test/tools/llvm-size/elf-berkeley.test
    llvm/test/tools/llvm-size/elf-sysv.test
    llvm/test/tools/obj2yaml/section-group.test
    llvm/test/tools/obj2yaml/special-symbol-indices.yaml
    llvm/test/tools/obj2yaml/symbol-type.yaml
    llvm/test/tools/sanstats/elf.test
    llvm/test/tools/yaml2obj/ELF/symbol-name.yaml
    llvm/test/tools/yaml2obj/ELF/symbol-stother.yaml

Removed: 
    


################################################################################
diff  --git a/llvm/test/DebugInfo/PDB/annotation.test b/llvm/test/DebugInfo/PDB/annotation.test
index ba6bd14061e4..f1c9357c36ad 100644
--- a/llvm/test/DebugInfo/PDB/annotation.test
+++ b/llvm/test/DebugInfo/PDB/annotation.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: llvm-pdbutil dump --symbols %t.obj | FileCheck %s
 # RUN: llvm-readobj -codeview %t.obj | FileCheck %s --check-prefix=READOBJ
 

diff  --git a/llvm/test/DebugInfo/PDB/obj-globalhash.test b/llvm/test/DebugInfo/PDB/obj-globalhash.test
index bf36b554abe9..06543ce1485e 100644
--- a/llvm/test/DebugInfo/PDB/obj-globalhash.test
+++ b/llvm/test/DebugInfo/PDB/obj-globalhash.test
@@ -1,5 +1,5 @@
-RUN: yaml2obj %p/Inputs/obj-hashes-1.yaml > %T/obj-hashes-1.obj
-RUN: yaml2obj %p/Inputs/obj-hashes-2.yaml > %T/obj-hashes-2.obj
+RUN: yaml2obj %p/Inputs/obj-hashes-1.yaml -o %T/obj-hashes-1.obj
+RUN: yaml2obj %p/Inputs/obj-hashes-2.yaml -o %T/obj-hashes-2.obj
 RUN: echo obj-hashes-1 > %T/hashes-combined.out
 RUN: llvm-pdbutil dump -type-extras %T/obj-hashes-1.obj >> %T/hashes-combined.out
 RUN: echo obj-hashes-2 >> %T/hashes-combined.out

diff  --git a/llvm/test/DebugInfo/PDB/using-namespace.test b/llvm/test/DebugInfo/PDB/using-namespace.test
index 92578e7eb1de..30681f47385c 100644
--- a/llvm/test/DebugInfo/PDB/using-namespace.test
+++ b/llvm/test/DebugInfo/PDB/using-namespace.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: llvm-readobj --codeview %t.obj | FileCheck %s
 
 # CHECK:         Kind: S_UNAMESPACE (0x1124)

diff  --git a/llvm/test/DebugInfo/invalid-relocations.test b/llvm/test/DebugInfo/invalid-relocations.test
index 9ac4877c9dbb..db5181f37939 100644
--- a/llvm/test/DebugInfo/invalid-relocations.test
+++ b/llvm/test/DebugInfo/invalid-relocations.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-dwarfdump %t.o 2>&1 | FileCheck %s
 # CHECK: failed to compute relocation: Unknown
 

diff  --git a/llvm/test/DebugInfo/precomp.test b/llvm/test/DebugInfo/precomp.test
index eff184ef9d92..0734f185a6f3 100644
--- a/llvm/test/DebugInfo/precomp.test
+++ b/llvm/test/DebugInfo/precomp.test
@@ -3,8 +3,8 @@ RUN: rm -rf %t1/
 RUN: mkdir %t1
 RUN: obj2yaml %S/Inputs/precomp-a.obj > %t1/precomp-a.yaml
 RUN: obj2yaml %S/Inputs/precomp.obj > %t1/precomp.yaml
-RUN: yaml2obj %t1/precomp-a.yaml > %t1/a.obj
-RUN: yaml2obj %t1/precomp.yaml > %t1/precomp.obj
+RUN: yaml2obj %t1/precomp-a.yaml -o %t1/a.obj
+RUN: yaml2obj %t1/precomp.yaml -o %t1/precomp.obj
 RUN: llvm-readobj --codeview %t1/a.obj | FileCheck %s -check-prefix PRECOMP
 RUN: llvm-readobj --codeview %t1/precomp.obj | FileCheck %s -check-prefix ENDPRECOMP
 RUN: llvm-pdbutil dump -types %t1/a.obj | FileCheck %s -check-prefix PDB-PRECOMP

diff  --git a/llvm/test/Object/AArch64/yaml2obj-elf-aarch64-rel.yaml b/llvm/test/Object/AArch64/yaml2obj-elf-aarch64-rel.yaml
index b8162bd3cd2a..779c37080844 100644
--- a/llvm/test/Object/AArch64/yaml2obj-elf-aarch64-rel.yaml
+++ b/llvm/test/Object/AArch64/yaml2obj-elf-aarch64-rel.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: obj2yaml  %t | FileCheck %s
 
 # CHECK:      - Name:            .rela.text

diff  --git a/llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml b/llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml
index 085241f6a855..7d2fd3b1fd06 100644
--- a/llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml
+++ b/llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml
@@ -1,103 +1,103 @@
-# RUN: yaml2obj -docnum=1 %s > %t.o.1
+# RUN: yaml2obj --docnum=1 %s -o %t.o.1
 # RUN: llvm-readobj -S --file-headers %t.o.1 | FileCheck --check-prefixes=ELF-ALL,ELF-R600 %s
 # RUN: obj2yaml %t.o.1 | FileCheck --check-prefixes=YAML-R600 %s
-# RUN: yaml2obj -docnum=2 %s > %t.o.2
+# RUN: yaml2obj --docnum=2 %s -o %t.o.2
 # RUN: llvm-readobj -S --file-headers %t.o.2 | FileCheck --check-prefixes=ELF-ALL,ELF-R630 %s
 # RUN: obj2yaml %t.o.2 | FileCheck --check-prefixes=YAML-R630 %s
-# RUN: yaml2obj -docnum=3 %s > %t.o.3
+# RUN: yaml2obj --docnum=3 %s -o %t.o.3
 # RUN: llvm-readobj -S --file-headers %t.o.3 | FileCheck --check-prefixes=ELF-ALL,ELF-RS880 %s
 # RUN: obj2yaml %t.o.3 | FileCheck --check-prefixes=YAML-RS880 %s
-# RUN: yaml2obj -docnum=4 %s > %t.o.4
+# RUN: yaml2obj --docnum=4 %s -o %t.o.4
 # RUN: llvm-readobj -S --file-headers %t.o.4 | FileCheck --check-prefixes=ELF-ALL,ELF-RV670 %s
 # RUN: obj2yaml %t.o.4 | FileCheck --check-prefixes=YAML-RV670 %s
-# RUN: yaml2obj -docnum=5 %s > %t.o.5
+# RUN: yaml2obj --docnum=5 %s -o %t.o.5
 # RUN: llvm-readobj -S --file-headers %t.o.5 | FileCheck --check-prefixes=ELF-ALL,ELF-RV710 %s
 # RUN: obj2yaml %t.o.5 | FileCheck --check-prefixes=YAML-RV710 %s
-# RUN: yaml2obj -docnum=6 %s > %t.o.6
+# RUN: yaml2obj --docnum=6 %s -o %t.o.6
 # RUN: llvm-readobj -S --file-headers %t.o.6 | FileCheck --check-prefixes=ELF-ALL,ELF-RV730 %s
 # RUN: obj2yaml %t.o.6 | FileCheck --check-prefixes=YAML-RV730 %s
-# RUN: yaml2obj -docnum=7 %s > %t.o.7
+# RUN: yaml2obj --docnum=7 %s -o %t.o.7
 # RUN: llvm-readobj -S --file-headers %t.o.7 | FileCheck --check-prefixes=ELF-ALL,ELF-RV770 %s
 # RUN: obj2yaml %t.o.7 | FileCheck --check-prefixes=YAML-RV770 %s
-# RUN: yaml2obj -docnum=8 %s > %t.o.8
+# RUN: yaml2obj --docnum=8 %s -o %t.o.8
 # RUN: llvm-readobj -S --file-headers %t.o.8 | FileCheck --check-prefixes=ELF-ALL,ELF-CEDAR %s
 # RUN: obj2yaml %t.o.8 | FileCheck --check-prefixes=YAML-CEDAR %s
-# RUN: yaml2obj -docnum=9 %s > %t.o.9
+# RUN: yaml2obj --docnum=9 %s -o %t.o.9
 # RUN: llvm-readobj -S --file-headers %t.o.9 | FileCheck --check-prefixes=ELF-ALL,ELF-CYPRESS %s
 # RUN: obj2yaml %t.o.9 | FileCheck --check-prefixes=YAML-CYPRESS %s
-# RUN: yaml2obj -docnum=10 %s > %t.o.10
+# RUN: yaml2obj --docnum=10 %s -o %t.o.10
 # RUN: llvm-readobj -S --file-headers %t.o.10 | FileCheck --check-prefixes=ELF-ALL,ELF-JUNIPER %s
 # RUN: obj2yaml %t.o.10 | FileCheck --check-prefixes=YAML-JUNIPER %s
-# RUN: yaml2obj -docnum=11 %s > %t.o.11
+# RUN: yaml2obj --docnum=11 %s -o %t.o.11
 # RUN: llvm-readobj -S --file-headers %t.o.11 | FileCheck --check-prefixes=ELF-ALL,ELF-REDWOOD %s
 # RUN: obj2yaml %t.o.11 | FileCheck --check-prefixes=YAML-REDWOOD %s
-# RUN: yaml2obj -docnum=12 %s > %t.o.12
+# RUN: yaml2obj --docnum=12 %s -o %t.o.12
 # RUN: llvm-readobj -S --file-headers %t.o.12 | FileCheck --check-prefixes=ELF-ALL,ELF-SUMO %s
 # RUN: obj2yaml %t.o.12 | FileCheck --check-prefixes=YAML-SUMO %s
-# RUN: yaml2obj -docnum=13 %s > %t.o.13
+# RUN: yaml2obj --docnum=13 %s -o %t.o.13
 # RUN: llvm-readobj -S --file-headers %t.o.13 | FileCheck --check-prefixes=ELF-ALL,ELF-BARTS %s
 # RUN: obj2yaml %t.o.13 | FileCheck --check-prefixes=YAML-BARTS %s
-# RUN: yaml2obj -docnum=14 %s > %t.o.14
+# RUN: yaml2obj --docnum=14 %s -o %t.o.14
 # RUN: llvm-readobj -S --file-headers %t.o.14 | FileCheck --check-prefixes=ELF-ALL,ELF-CAICOS %s
 # RUN: obj2yaml %t.o.14 | FileCheck --check-prefixes=YAML-CAICOS %s
-# RUN: yaml2obj -docnum=15 %s > %t.o.15
+# RUN: yaml2obj --docnum=15 %s -o %t.o.15
 # RUN: llvm-readobj -S --file-headers %t.o.15 | FileCheck --check-prefixes=ELF-ALL,ELF-CAYMAN %s
 # RUN: obj2yaml %t.o.15 | FileCheck --check-prefixes=YAML-CAYMAN %s
-# RUN: yaml2obj -docnum=16 %s > %t.o.16
+# RUN: yaml2obj --docnum=16 %s -o %t.o.16
 # RUN: llvm-readobj -S --file-headers %t.o.16 | FileCheck --check-prefixes=ELF-ALL,ELF-TURKS %s
 # RUN: obj2yaml %t.o.16 | FileCheck --check-prefixes=YAML-TURKS %s
-# RUN: yaml2obj -docnum=17 %s > %t.o.17
+# RUN: yaml2obj --docnum=17 %s -o %t.o.17
 # RUN: llvm-readobj -S --file-headers %t.o.17 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX600 %s
 # RUN: obj2yaml %t.o.17 | FileCheck --check-prefixes=YAML-GFX600 %s
-# RUN: yaml2obj -docnum=18 %s > %t.o.18
+# RUN: yaml2obj --docnum=18 %s -o %t.o.18
 # RUN: llvm-readobj -S --file-headers %t.o.18 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX601 %s
 # RUN: obj2yaml %t.o.18 | FileCheck --check-prefixes=YAML-GFX601 %s
-# RUN: yaml2obj -docnum=19 %s > %t.o.19
+# RUN: yaml2obj --docnum=19 %s -o %t.o.19
 # RUN: llvm-readobj -S --file-headers %t.o.19 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX700 %s
 # RUN: obj2yaml %t.o.19 | FileCheck --check-prefixes=YAML-GFX700 %s
-# RUN: yaml2obj -docnum=20 %s > %t.o.20
+# RUN: yaml2obj --docnum=20 %s -o %t.o.20
 # RUN: llvm-readobj -S --file-headers %t.o.20 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX701 %s
 # RUN: obj2yaml %t.o.20 | FileCheck --check-prefixes=YAML-GFX701 %s
-# RUN: yaml2obj -docnum=21 %s > %t.o.21
+# RUN: yaml2obj --docnum=21 %s -o %t.o.21
 # RUN: llvm-readobj -S --file-headers %t.o.21 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX702 %s
 # RUN: obj2yaml %t.o.21 | FileCheck --check-prefixes=YAML-GFX702 %s
-# RUN: yaml2obj -docnum=22 %s > %t.o.22
+# RUN: yaml2obj --docnum=22 %s -o %t.o.22
 # RUN: llvm-readobj -S --file-headers %t.o.22 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX703 %s
 # RUN: obj2yaml %t.o.22 | FileCheck --check-prefixes=YAML-GFX703 %s
-# RUN: yaml2obj -docnum=23 %s > %t.o.23
+# RUN: yaml2obj --docnum=23 %s -o %t.o.23
 # RUN: llvm-readobj -S --file-headers %t.o.23 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX704 %s
 # RUN: obj2yaml %t.o.23 | FileCheck --check-prefixes=YAML-GFX704 %s
-# RUN: yaml2obj -docnum=24 %s > %t.o.24
+# RUN: yaml2obj --docnum=24 %s -o %t.o.24
 # RUN: llvm-readobj -S --file-headers %t.o.24 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX801 %s
 # RUN: obj2yaml %t.o.24 | FileCheck --check-prefixes=YAML-GFX801 %s
-# RUN: yaml2obj -docnum=25 %s > %t.o.25
+# RUN: yaml2obj --docnum=25 %s -o %t.o.25
 # RUN: llvm-readobj -S --file-headers %t.o.25 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX802 %s
 # RUN: obj2yaml %t.o.25 | FileCheck --check-prefixes=YAML-GFX802 %s
-# RUN: yaml2obj -docnum=26 %s > %t.o.26
+# RUN: yaml2obj --docnum=26 %s -o %t.o.26
 # RUN: llvm-readobj -S --file-headers %t.o.26 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX803 %s
 # RUN: obj2yaml %t.o.26 | FileCheck --check-prefixes=YAML-GFX803 %s
-# RUN: yaml2obj -docnum=27 %s > %t.o.27
+# RUN: yaml2obj --docnum=27 %s -o %t.o.27
 # RUN: llvm-readobj -S --file-headers %t.o.27 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX810 %s
 # RUN: obj2yaml %t.o.27 | FileCheck --check-prefixes=YAML-GFX810 %s
-# RUN: yaml2obj -docnum=28 %s > %t.o.28
+# RUN: yaml2obj --docnum=28 %s -o %t.o.28
 # RUN: llvm-readobj -S --file-headers %t.o.28 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX900 %s
 # RUN: obj2yaml %t.o.28 | FileCheck --check-prefixes=YAML-GFX900 %s
-# RUN: yaml2obj -docnum=29 %s > %t.o.29
+# RUN: yaml2obj --docnum=29 %s -o %t.o.29
 # RUN: llvm-readobj -S --file-headers %t.o.29 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX902 %s
 # RUN: obj2yaml %t.o.29 | FileCheck --check-prefixes=YAML-GFX902 %s
-# RUN: yaml2obj -docnum=30 %s > %t.o.30
+# RUN: yaml2obj --docnum=30 %s -o %t.o.30
 # RUN: llvm-readobj -S --file-headers %t.o.30 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX904 %s
 # RUN: obj2yaml %t.o.30 | FileCheck --check-prefixes=YAML-GFX904 %s
-# RUN: yaml2obj -docnum=31 %s > %t.o.31
+# RUN: yaml2obj --docnum=31 %s -o %t.o.31
 # RUN: llvm-readobj -S --file-headers %t.o.31 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX906 %s
 # RUN: obj2yaml %t.o.31 | FileCheck --check-prefixes=YAML-GFX906 %s
-# RUN: yaml2obj -docnum=32 %s > %t.o.32
+# RUN: yaml2obj --docnum=32 %s -o %t.o.32
 # RUN: llvm-readobj -s -file-headers %t.o.32 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX908 %s
 # RUN: obj2yaml %t.o.32 | FileCheck --check-prefixes=YAML-GFX908 %s
-# RUN: yaml2obj -docnum=33 %s > %t.o.33
+# RUN: yaml2obj --docnum=33 %s -o %t.o.33
 # RUN: llvm-readobj -s -file-headers %t.o.33 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX909 %s
 # RUN: obj2yaml %t.o.33 | FileCheck --check-prefixes=YAML-GFX909 %s
-# RUN: yaml2obj -docnum=34 %s > %t.o.34
+# RUN: yaml2obj --docnum=34 %s -o %t.o.34
 # RUN: llvm-readobj -s -file-headers %t.o.34 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX1010 %s
 # RUN: obj2yaml %t.o.34 | FileCheck --check-prefixes=YAML-GFX1010 %s
 

diff  --git a/llvm/test/Object/AMDGPU/elf-header-flags-sram-ecc.yaml b/llvm/test/Object/AMDGPU/elf-header-flags-sram-ecc.yaml
index 6d105193f66a..8d038b4932a3 100644
--- a/llvm/test/Object/AMDGPU/elf-header-flags-sram-ecc.yaml
+++ b/llvm/test/Object/AMDGPU/elf-header-flags-sram-ecc.yaml
@@ -1,10 +1,10 @@
-# RUN: yaml2obj -docnum=1 %s > %t.o.1
+# RUN: yaml2obj --docnum=1 %s -o %t.o.1
 # RUN: llvm-readobj -S --file-headers %t.o.1 | FileCheck --check-prefixes=ELF-ALL,ELF-SRAM-ECC-NONE %s
 # RUN: obj2yaml %t.o.1 | FileCheck --check-prefixes=YAML-SRAM-ECC-NONE %s
-# RUN: yaml2obj -docnum=2 %s > %t.o.2
+# RUN: yaml2obj --docnum=2 %s -o %t.o.2
 # RUN: llvm-readobj -S --file-headers %t.o.2 | FileCheck --check-prefixes=ELF-ALL,ELF-SRAM-ECC-GFX900 %s
 # RUN: obj2yaml %t.o.2 | FileCheck --check-prefixes=YAML-SRAM-ECC-GFX900 %s
-# RUN: yaml2obj -docnum=3 %s > %t.o.3
+# RUN: yaml2obj --docnum=3 %s -o %t.o.3
 # RUN: llvm-readobj -S --file-headers %t.o.3 | FileCheck --check-prefixes=ELF-ALL,ELF-SRAM-ECC-XNACK-GFX900 %s
 # RUN: obj2yaml %t.o.3 | FileCheck --check-prefixes=YAML-SRAM-ECC-XNACK-GFX900 %s
 

diff  --git a/llvm/test/Object/AMDGPU/elf-header-flags-xnack.yaml b/llvm/test/Object/AMDGPU/elf-header-flags-xnack.yaml
index c24316467371..c0e32d84b7eb 100644
--- a/llvm/test/Object/AMDGPU/elf-header-flags-xnack.yaml
+++ b/llvm/test/Object/AMDGPU/elf-header-flags-xnack.yaml
@@ -1,7 +1,7 @@
-# RUN: yaml2obj -docnum=1 %s > %t.o.1
+# RUN: yaml2obj --docnum=1 %s -o %t.o.1
 # RUN: llvm-readobj -S --file-headers %t.o.1 | FileCheck --check-prefixes=ELF-ALL,ELF-XNACK-NONE %s
 # RUN: obj2yaml %t.o.1 | FileCheck --check-prefixes=YAML-XNACK-NONE %s
-# RUN: yaml2obj -docnum=2 %s > %t.o.2
+# RUN: yaml2obj --docnum=2 %s -o %t.o.2
 # RUN: llvm-readobj -S --file-headers %t.o.2 | FileCheck --check-prefixes=ELF-ALL,ELF-XNACK-GFX801 %s
 # RUN: obj2yaml %t.o.2 | FileCheck --check-prefixes=YAML-XNACK-GFX801 %s
 

diff  --git a/llvm/test/Object/AMDGPU/elf-header-osabi.yaml b/llvm/test/Object/AMDGPU/elf-header-osabi.yaml
index b22c1976fc11..9b22275e1253 100644
--- a/llvm/test/Object/AMDGPU/elf-header-osabi.yaml
+++ b/llvm/test/Object/AMDGPU/elf-header-osabi.yaml
@@ -1,10 +1,10 @@
-# RUN: yaml2obj -docnum=1 %s > %t.o.1
+# RUN: yaml2obj --docnum=1 %s -o %t.o.1
 # RUN: llvm-readobj -S --file-headers %t.o.1 | FileCheck --check-prefixes=ELF-HSA %s
 # RUN: obj2yaml %t.o.1 | FileCheck --check-prefixes=YAML-HSA %s
-# RUN: yaml2obj -docnum=2 %s > %t.o.2
+# RUN: yaml2obj --docnum=2 %s -o %t.o.2
 # RUN: llvm-readobj -S --file-headers %t.o.2 | FileCheck --check-prefixes=ELF-PAL %s
 # RUN: obj2yaml %t.o.2 | FileCheck --check-prefixes=YAML-PAL %s
-# RUN: yaml2obj -docnum=3 %s > %t.o.3
+# RUN: yaml2obj --docnum=3 %s -o %t.o.3
 # RUN: llvm-readobj -S --file-headers %t.o.3 | FileCheck --check-prefixes=ELF-MESA3D %s
 # RUN: obj2yaml %t.o.3 | FileCheck --check-prefixes=YAML-MESA3D %s
 

diff  --git a/llvm/test/Object/AMDGPU/elf32-unknown.yaml b/llvm/test/Object/AMDGPU/elf32-unknown.yaml
index 27283b895e76..4c43401499c4 100644
--- a/llvm/test/Object/AMDGPU/elf32-unknown.yaml
+++ b/llvm/test/Object/AMDGPU/elf32-unknown.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-readobj -S --file-headers %t.o | FileCheck %s
 
 # CHECK: Format: ELF32-amdgpu

diff  --git a/llvm/test/Object/AMDGPU/elf64-relocs.yaml b/llvm/test/Object/AMDGPU/elf64-relocs.yaml
index 0e6bc2fcfc4c..ad16e68a3402 100644
--- a/llvm/test/Object/AMDGPU/elf64-relocs.yaml
+++ b/llvm/test/Object/AMDGPU/elf64-relocs.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-readobj -r %t | FileCheck %s
 
 # CHECK: Relocations [

diff  --git a/llvm/test/Object/AMDGPU/elf64-unknown.yaml b/llvm/test/Object/AMDGPU/elf64-unknown.yaml
index d54a50d1c851..b991df62a555 100644
--- a/llvm/test/Object/AMDGPU/elf64-unknown.yaml
+++ b/llvm/test/Object/AMDGPU/elf64-unknown.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-readobj -S --file-headers %t.o | FileCheck %s
 
 # CHECK: Format: ELF64-amdgpu

diff  --git a/llvm/test/Object/Lanai/yaml2obj-elf-lanai-rel.yaml b/llvm/test/Object/Lanai/yaml2obj-elf-lanai-rel.yaml
index b5e6465a0e67..23f0b2f6ece9 100644
--- a/llvm/test/Object/Lanai/yaml2obj-elf-lanai-rel.yaml
+++ b/llvm/test/Object/Lanai/yaml2obj-elf-lanai-rel.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-readobj -r %t | FileCheck %s
 
 # CHECK:      Relocations [

diff  --git a/llvm/test/Object/Mips/abi-flags.yaml b/llvm/test/Object/Mips/abi-flags.yaml
index ce8234a9a0db..4fa09d179da0 100644
--- a/llvm/test/Object/Mips/abi-flags.yaml
+++ b/llvm/test/Object/Mips/abi-flags.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-readobj -A %t | FileCheck -check-prefix=OBJ %s
 # RUN: obj2yaml %t | FileCheck -check-prefix=YAML %s
 

diff  --git a/llvm/test/Object/Mips/elf-mips64-rel.yaml b/llvm/test/Object/Mips/elf-mips64-rel.yaml
index 169978ac5b59..3ffdadafad5d 100644
--- a/llvm/test/Object/Mips/elf-mips64-rel.yaml
+++ b/llvm/test/Object/Mips/elf-mips64-rel.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-readobj -r %t | FileCheck -check-prefix=OBJ %s
 # RUN: obj2yaml %t | FileCheck -check-prefix=YAML %s
 

diff  --git a/llvm/test/Object/RISCV/elf-flags.yaml b/llvm/test/Object/RISCV/elf-flags.yaml
index 24c8e6c26d6e..2facec20f041 100644
--- a/llvm/test/Object/RISCV/elf-flags.yaml
+++ b/llvm/test/Object/RISCV/elf-flags.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-readobj --file-headers %t | FileCheck -check-prefix=OBJ %s
 # RUN: obj2yaml %t | FileCheck -check-prefix=YAML %s
 

diff  --git a/llvm/test/Object/X86/objdump-disassembly-inline-relocations.test b/llvm/test/Object/X86/objdump-disassembly-inline-relocations.test
index b881aff9cfbb..e7ee2084b56d 100644
--- a/llvm/test/Object/X86/objdump-disassembly-inline-relocations.test
+++ b/llvm/test/Object/X86/objdump-disassembly-inline-relocations.test
@@ -69,7 +69,7 @@
 # MACHO-x86-64:       23:       48 83 c4 08                                     addq    $8, %rsp
 # MACHO-x86-64:       27:       c3                                              ret
 
-# RUN: yaml2obj -docnum=1 %s > %t.elf-i386
+# RUN: yaml2obj --docnum=1 %s -o %t.elf-i386
 # RUN: llvm-objdump -d -r %t.elf-i386 | FileCheck %s -check-prefix ELF-i386
 
 # ELF-i386: file format ELF32-i386
@@ -126,7 +126,7 @@ Symbols:
   - Name:    puts
     Binding: STB_GLOBAL
 
-# RUN: yaml2obj -docnum=2 %s > %t.elf-x86-64
+# RUN: yaml2obj --docnum=2 %s -o %t.elf-x86-64
 # RUN: llvm-objdump -d -r %t.elf-x86-64 | FileCheck %s -check-prefix ELF-x86-64
 
 --- !ELF

diff  --git a/llvm/test/Object/X86/objdump-trivial-object.test b/llvm/test/Object/X86/objdump-trivial-object.test
index 3071db16e561..b70b6a2de516 100644
--- a/llvm/test/Object/X86/objdump-trivial-object.test
+++ b/llvm/test/Object/X86/objdump-trivial-object.test
@@ -26,7 +26,7 @@
 # COFF-x86-64:       21: 48 83 c4 28                  addq    $40, %rsp
 # COFF-x86-64:       25: c3                           ret
 
-# RUN: yaml2obj -docnum=1 %s > %t.elf-i386
+# RUN: yaml2obj --docnum=1 %s -o %t.elf-i386
 # RUN: llvm-objdump -d %t.elf-i386 | FileCheck %s -check-prefix ELF-i386
 
 # ELF-i386: file format ELF32-i386
@@ -52,7 +52,7 @@ Sections:
     Flags:   [ SHF_ALLOC, SHF_EXECINSTR ]
     Content: 83EC0CC744240800000000C7042400000000E8FCFFFFFFE8FCFFFFFF8B44240883C40CC3
 
-# RUN: yaml2obj -docnum=2 %s > %t.elf-x86-64
+# RUN: yaml2obj --docnum=2 %s -o %t.elf-x86-64
 # RUN: llvm-objdump -d %t.elf-x86-64 | FileCheck %s -check-prefix ELF-x86-64
 
 # ELF-x86-64: file format ELF64-x86-64

diff  --git a/llvm/test/Object/X86/yaml-elf-x86-rel-broken.yaml b/llvm/test/Object/X86/yaml-elf-x86-rel-broken.yaml
index 05572675d1c2..7121a2886394 100644
--- a/llvm/test/Object/X86/yaml-elf-x86-rel-broken.yaml
+++ b/llvm/test/Object/X86/yaml-elf-x86-rel-broken.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: obj2yaml %t | FileCheck %s
 
 # CHECK:       Relocations:

diff  --git a/llvm/test/Object/X86/yaml2obj-elf-x86-rel.yaml b/llvm/test/Object/X86/yaml2obj-elf-x86-rel.yaml
index d0e69305081f..fcc285b7c3cd 100644
--- a/llvm/test/Object/X86/yaml2obj-elf-x86-rel.yaml
+++ b/llvm/test/Object/X86/yaml2obj-elf-x86-rel.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-readobj -r %t | FileCheck %s
 
 # CHECK:      Relocations [

diff  --git a/llvm/test/Object/archive-format.test b/llvm/test/Object/archive-format.test
index 77e7a5de009f..fd9f0ae967bd 100644
--- a/llvm/test/Object/archive-format.test
+++ b/llvm/test/Object/archive-format.test
@@ -83,7 +83,7 @@ tools on some versions of Solaris will abort operations if there is no
 symbol table.  Create such an object, put it into an archive, and check to
 see that there is an empty symbol table.
 RUN: mkdir -p %t
-RUN: yaml2obj %S/Inputs/solaris-nosymbols.yaml > %t/foo.o
+RUN: yaml2obj %S/Inputs/solaris-nosymbols.yaml -o %t/foo.o
 RUN: llvm-ar rs %t/foo.a %t/foo.o
 RUN: cat -v %t/foo.a | FileCheck -strict-whitespace --check-prefix=SOLARIS %s
 SOLARIS:      !<arch>

diff  --git a/llvm/test/Object/archive-symtab.test b/llvm/test/Object/archive-symtab.test
index 813801decfd1..d77244a0e7a8 100644
--- a/llvm/test/Object/archive-symtab.test
+++ b/llvm/test/Object/archive-symtab.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj -docnum=1 %s > %t.elf-x86-64
-# RUN: yaml2obj -docnum=2 %s > %t2.elf-x86-64
+# RUN: yaml2obj --docnum=1 %s -o %t.elf-x86-64
+# RUN: yaml2obj --docnum=2 %s -o %t2.elf-x86-64
 
 --- !ELF
 FileHeader:

diff  --git a/llvm/test/Object/nm-error.test b/llvm/test/Object/nm-error.test
index 9b66e10ebeb1..dfcaae98ddea 100644
--- a/llvm/test/Object/nm-error.test
+++ b/llvm/test/Object/nm-error.test
@@ -1,7 +1,7 @@
 ## Test that llvm-nm returns an error because of the unknown file type, but
 ## keeps processing subsequent files.
 
-# RUN: yaml2obj %s > %t-i386
+# RUN: yaml2obj %s -o %t-i386
 # RUN: touch %t
 # RUN: not llvm-nm %t-i386 %t %t-i386 | FileCheck %s
 

diff  --git a/llvm/test/Object/nm-shared-object.test b/llvm/test/Object/nm-shared-object.test
index 914c8dc23264..a9eb379985e4 100644
--- a/llvm/test/Object/nm-shared-object.test
+++ b/llvm/test/Object/nm-shared-object.test
@@ -34,7 +34,7 @@
 
 # ERROR: File format has no dynamic symbol table.
 
-# RUN: yaml2obj %s > %t.elf-i386
+# RUN: yaml2obj %s -o %t.elf-i386
 # RUN: llvm-nm -D %t.elf-i386 2>&1 | FileCheck %s -check-prefix=NO-SYMBOLS
 
 # NO-SYMBOLS: no symbols

diff  --git a/llvm/test/Object/nm-trivial-object.test b/llvm/test/Object/nm-trivial-object.test
index 55ffd24aef6b..873e516cfbf0 100644
--- a/llvm/test/Object/nm-trivial-object.test
+++ b/llvm/test/Object/nm-trivial-object.test
@@ -29,7 +29,7 @@
 # WASM-NEXT:          U puts
 # WASM-NEXT: 00000010 D var
 
-# RUN: yaml2obj -docnum=1 %s > %t.elf-i386
+# RUN: yaml2obj --docnum=1 %s -o %t.elf-i386
 
 --- !ELF
 FileHeader:
@@ -79,7 +79,7 @@ Symbols:
 
 ## Test 
diff erent ELF symbols for 64-bit platform.
 
-# RUN: yaml2obj -docnum=2 %s > %t.elf-x86-64
+# RUN: yaml2obj --docnum=2 %s -o %t.elf-x86-64
 # RUN: llvm-nm %t.elf-x86-64 | FileCheck %s -check-prefix ELF64
 
 # ELF64:                  U SomeOtherFunction
@@ -157,7 +157,7 @@ Symbols:
 
 ## Test llvm-nm shows all symbols with -a.
 
-# RUN: yaml2obj -docnum=3 %s > %t-a.elf-x86-64
+# RUN: yaml2obj --docnum=3 %s -o %t-a.elf-x86-64
 # RUN: llvm-nm -a %t-a.elf-x86-64 | FileCheck %s -check-prefix ELF64-a
 
 # ELF64-a:      00000000 b .bss
@@ -221,7 +221,7 @@ Symbols:
 
 ## Test that we drop the thumb bit only from function addresses.
 
-# RUN: yaml2obj -docnum=4 %s > %t.elf-arm32
+# RUN: yaml2obj --docnum=4 %s -o %t.elf-arm32
 # RUN: llvm-nm %t.elf-arm32 | FileCheck %s -check-prefix ELF-THUMB
 
 # ELF-THUMB: 00000000 t func

diff  --git a/llvm/test/Object/obj2yaml.test b/llvm/test/Object/obj2yaml.test
index badc604239a1..a2b26a24b988 100644
--- a/llvm/test/Object/obj2yaml.test
+++ b/llvm/test/Object/obj2yaml.test
@@ -524,7 +524,7 @@
 # ELF-MIPS64EL-NEXT:     - Name:            zed
 # ELF-MIPS64EL-NEXT:       Binding:         STB_GLOBAL
 
-# RUN: yaml2obj %s > %t-x86-64
+# RUN: yaml2obj %s -o %t-x86-64
 # RUN: obj2yaml %t-x86-64 | FileCheck %s --check-prefix ELF-X86-64
 
 # ELF-X86-64:      FileHeader:

diff  --git a/llvm/test/Object/objdump-relocations.test b/llvm/test/Object/objdump-relocations.test
index 5f8fbcc8fc05..bd8cd65634a8 100644
--- a/llvm/test/Object/objdump-relocations.test
+++ b/llvm/test/Object/objdump-relocations.test
@@ -3,7 +3,7 @@
 # RUN: llvm-objdump -r %p/Inputs/trivial-object-test.coff-x86-64 \
 # RUN:              | FileCheck %s -check-prefix COFF-x86-64
 
-# RUN: yaml2obj -docnum=1 %s > %t-i386
+# RUN: yaml2obj --docnum=1 %s -o %t-i386
 # RUN: llvm-objdump -r %t-i386 | FileCheck %s -check-prefix ELF-i386
 
 # ELF-i386: .text
@@ -39,7 +39,7 @@ Symbols:
   - Name:    symbol
     Binding: STB_GLOBAL
 
-# RUN: yaml2obj -docnum=2 %s > %t-x86-64
+# RUN: yaml2obj --docnum=2 %s -o %t-x86-64
 # RUN: llvm-objdump -r %t-x86-64 | FileCheck %s -check-prefix ELF-x86-64
 
 # ELF-x86-64: .text

diff  --git a/llvm/test/Object/objdump-section-content.test b/llvm/test/Object/objdump-section-content.test
index 877fd9651c7d..53ef60928b38 100644
--- a/llvm/test/Object/objdump-section-content.test
+++ b/llvm/test/Object/objdump-section-content.test
@@ -8,7 +8,7 @@
 # COFF-i386: Contents of section .data:
 # COFF-i386:  0000 48656c6c 6f20576f 726c6421 00        Hello World!.
 
-# RUN: yaml2obj %s > %t.elf-i386
+# RUN: yaml2obj %s -o %t.elf-i386
 # RUN: llvm-objdump -s %t.elf-i386 | FileCheck %s -DFILE=%t.elf-i386 -check-prefix ELF-i386
 
 # ELF-i386: [[FILE]]:     file format

diff  --git a/llvm/test/Object/objdump-sectionheaders.test b/llvm/test/Object/objdump-sectionheaders.test
index aab3f54d7dbf..320db8710fcf 100644
--- a/llvm/test/Object/objdump-sectionheaders.test
+++ b/llvm/test/Object/objdump-sectionheaders.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.elf-x86-64
+# RUN: yaml2obj %s -o %t.elf-x86-64
 # RUN: llvm-objdump -h %t.elf-x86-64 | FileCheck %s
 
 # To verify this, use readelf -S, not objdump -h. Binutils objdump filters the

diff  --git a/llvm/test/Object/objdump-symbol-table.test b/llvm/test/Object/objdump-symbol-table.test
index 9c8a6b7ec1dc..bfd46cd63fbe 100644
--- a/llvm/test/Object/objdump-symbol-table.test
+++ b/llvm/test/Object/objdump-symbol-table.test
@@ -12,7 +12,7 @@
 # COFF-i386: [  6](sec  0)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 _puts
 # COFF-i386: [  7](sec  0)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 _SomeOtherFunction
 
-# RUN: yaml2obj %s > %t.elf-i386
+# RUN: yaml2obj %s -o %t.elf-i386
 # RUN: llvm-objdump -t %t.elf-i386 | FileCheck %s -check-prefix ELF-i386
 
 # ELF-i386: {{.*}}elf-i386:     file format

diff  --git a/llvm/test/Object/readobj-absent.test b/llvm/test/Object/readobj-absent.test
index 40175e710a99..119ef82b27f5 100644
--- a/llvm/test/Object/readobj-absent.test
+++ b/llvm/test/Object/readobj-absent.test
@@ -1,5 +1,5 @@
 ## Don't crash if required information is absent
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-readobj --dyn-syms %t
 
 --- !ELF

diff  --git a/llvm/test/Object/wasm-invalid-file.yaml b/llvm/test/Object/wasm-invalid-file.yaml
index e562dfaa815e..5ea192d66177 100644
--- a/llvm/test/Object/wasm-invalid-file.yaml
+++ b/llvm/test/Object/wasm-invalid-file.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.wasm
+# RUN: yaml2obj %s -o %t.wasm
 # RUN: echo -e -n "\x01" >> %t.wasm
 # Append a new section but truncate the encoding of the section size
 # RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-LEB-DECODE
@@ -15,7 +15,7 @@ FileHeader:
 
 # CHECK-SECTION-SIZE: '{{.*}}.wasm': Section too large
 
-# RUN: yaml2obj %s > %t.wasm
+# RUN: yaml2obj %s -o %t.wasm
 # # Append an section with invalid type (type 0x20, size 0x1, content 0x0)
 # RUN: echo -e -n "\x20\x01\x00" >> %t.wasm
 # RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-SECTION-TYPE

diff  --git a/llvm/test/ObjectYAML/CodeView/sections.yaml b/llvm/test/ObjectYAML/CodeView/sections.yaml
index 5d0ced016651..9d13e62f9e4f 100644
--- a/llvm/test/ObjectYAML/CodeView/sections.yaml
+++ b/llvm/test/ObjectYAML/CodeView/sections.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
 # RUN: obj2yaml %t.obj | FileCheck --check-prefix=CHECK %s
 # RUN: llvm-objdump -section-headers %t.obj | FileCheck --check-prefix=HEADERS %s
 

diff  --git a/llvm/test/ObjectYAML/MachO/section_data.yaml b/llvm/test/ObjectYAML/MachO/section_data.yaml
index 25fd04ae8552..87c5bc803ee1 100644
--- a/llvm/test/ObjectYAML/MachO/section_data.yaml
+++ b/llvm/test/ObjectYAML/MachO/section_data.yaml
@@ -42,7 +42,7 @@ LoadCommands:
         content:         CDAB3412
 
 ## Case 2: The content size equals the section size.
-# RUN: yaml2obj --docnum=2 %s > %t2
+# RUN: yaml2obj --docnum=2 %s -o %t2
 # RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s --check-prefix=CASE2
 # CASE2:       Index: 0
 # CASE2-NEXT:  Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
@@ -102,7 +102,7 @@ LoadCommands:
 
 ## Case 3: The content size is less than the section size. In this case, the area
 ## after the custom content is filled with zeroes.
-# RUN: yaml2obj --docnum=3 %s > %t3
+# RUN: yaml2obj --docnum=3 %s -o %t3
 # RUN: llvm-readobj --sections --section-data %t3 | FileCheck %s --check-prefix=CASE3
 # CASE3:       Index: 0
 # CASE3-NEXT:  Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)

diff  --git a/llvm/test/tools/llvm-elfabi/binary-read-add-soname.test b/llvm/test/tools/llvm-elfabi/binary-read-add-soname.test
index 744fa51d0561..e5d0860199d7 100644
--- a/llvm/test/tools/llvm-elfabi/binary-read-add-soname.test
+++ b/llvm/test/tools/llvm-elfabi/binary-read-add-soname.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-elfabi --elf %t --emit-tbe=- --soname=best.so | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-elfabi/binary-read-arch.test b/llvm/test/tools/llvm-elfabi/binary-read-arch.test
index 918a0c667d90..1fea6ebbeaf6 100644
--- a/llvm/test/tools/llvm-elfabi/binary-read-arch.test
+++ b/llvm/test/tools/llvm-elfabi/binary-read-arch.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-elfabi --elf %t --emit-tbe=- | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-elfabi/binary-read-bad-soname.test b/llvm/test/tools/llvm-elfabi/binary-read-bad-soname.test
index a92d61e607d0..0a1f9d931c17 100644
--- a/llvm/test/tools/llvm-elfabi/binary-read-bad-soname.test
+++ b/llvm/test/tools/llvm-elfabi/binary-read-bad-soname.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-elfabi/binary-read-bad-vaddr.test b/llvm/test/tools/llvm-elfabi/binary-read-bad-vaddr.test
index b9806e94fb9c..dfdc0e6ade63 100644
--- a/llvm/test/tools/llvm-elfabi/binary-read-bad-vaddr.test
+++ b/llvm/test/tools/llvm-elfabi/binary-read-bad-vaddr.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-elfabi/binary-read-neededlibs-bad-offset.test b/llvm/test/tools/llvm-elfabi/binary-read-neededlibs-bad-offset.test
index 6b7ba8b2d198..bb832210df93 100644
--- a/llvm/test/tools/llvm-elfabi/binary-read-neededlibs-bad-offset.test
+++ b/llvm/test/tools/llvm-elfabi/binary-read-neededlibs-bad-offset.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-elfabi/binary-read-no-dt-strsz.test b/llvm/test/tools/llvm-elfabi/binary-read-no-dt-strsz.test
index 99e06b2ca87b..cf4561e0e270 100644
--- a/llvm/test/tools/llvm-elfabi/binary-read-no-dt-strsz.test
+++ b/llvm/test/tools/llvm-elfabi/binary-read-no-dt-strsz.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-elfabi/binary-read-no-dt-strtab.test b/llvm/test/tools/llvm-elfabi/binary-read-no-dt-strtab.test
index 79f4496cc9f6..315aae3bda84 100644
--- a/llvm/test/tools/llvm-elfabi/binary-read-no-dt-strtab.test
+++ b/llvm/test/tools/llvm-elfabi/binary-read-no-dt-strtab.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-elfabi/binary-read-no-dynamic.test b/llvm/test/tools/llvm-elfabi/binary-read-no-dynamic.test
index 475d7bf7b842..fc88d83340e2 100644
--- a/llvm/test/tools/llvm-elfabi/binary-read-no-dynamic.test
+++ b/llvm/test/tools/llvm-elfabi/binary-read-no-dynamic.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-elfabi/binary-read-replace-soname.test b/llvm/test/tools/llvm-elfabi/binary-read-replace-soname.test
index 762dcbb91346..4e6c1f7cb568 100644
--- a/llvm/test/tools/llvm-elfabi/binary-read-replace-soname.test
+++ b/llvm/test/tools/llvm-elfabi/binary-read-replace-soname.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-elfabi --elf %t --emit-tbe=- | FileCheck %s --check-prefix=ORIGINAL
 # RUN: llvm-elfabi --elf %t --emit-tbe=- --soname=libbest.so | FileCheck %s --check-prefix=REPLACED
 

diff  --git a/llvm/test/tools/llvm-elfabi/binary-read-soname-no-null.test b/llvm/test/tools/llvm-elfabi/binary-read-soname-no-null.test
index 30aa6794298d..099b5741f769 100644
--- a/llvm/test/tools/llvm-elfabi/binary-read-soname-no-null.test
+++ b/llvm/test/tools/llvm-elfabi/binary-read-soname-no-null.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-elfabi/binary-read-soname.test b/llvm/test/tools/llvm-elfabi/binary-read-soname.test
index ef35b893dc01..960cc65b6dd1 100644
--- a/llvm/test/tools/llvm-elfabi/binary-read-soname.test
+++ b/llvm/test/tools/llvm-elfabi/binary-read-soname.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-elfabi --elf %t --emit-tbe=- | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-lipo/archs-macho-binary-unknown.test b/llvm/test/tools/llvm-lipo/archs-macho-binary-unknown.test
index ceda7d4b5e18..cf92b825fec5 100644
--- a/llvm/test/tools/llvm-lipo/archs-macho-binary-unknown.test
+++ b/llvm/test/tools/llvm-lipo/archs-macho-binary-unknown.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # Tests that the output for an unknown architecture is the same as cctools lipo
 # RUN: llvm-lipo %t -archs | FileCheck %s
 # CHECK: unknown(151,3)

diff  --git a/llvm/test/tools/llvm-lipo/archs-macho-binary.test b/llvm/test/tools/llvm-lipo/archs-macho-binary.test
index 56f913263dac..d71fe5e02477 100644
--- a/llvm/test/tools/llvm-lipo/archs-macho-binary.test
+++ b/llvm/test/tools/llvm-lipo/archs-macho-binary.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # RUN: llvm-lipo %t -archs | FileCheck --check-prefix=ARCHS %s
 # RUN: llvm-lipo %t --archs | FileCheck --check-prefix=ARCHS %s

diff  --git a/llvm/test/tools/llvm-lipo/archs-universal-binary-arm.test b/llvm/test/tools/llvm-lipo/archs-universal-binary-arm.test
index 81c112593a41..4f8708d721e8 100644
--- a/llvm/test/tools/llvm-lipo/archs-universal-binary-arm.test
+++ b/llvm/test/tools/llvm-lipo/archs-universal-binary-arm.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-lipo %t -archs | FileCheck %s
 # CHECK: armv7k arm64
 

diff  --git a/llvm/test/tools/llvm-lipo/archs-universal-binary-unknown.test b/llvm/test/tools/llvm-lipo/archs-universal-binary-unknown.test
index 353a95ddb02b..dbdf01b704fe 100644
--- a/llvm/test/tools/llvm-lipo/archs-universal-binary-unknown.test
+++ b/llvm/test/tools/llvm-lipo/archs-universal-binary-unknown.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # Tests that the output for an unknown architecture is the same as cctools lipo
 # RUN: llvm-lipo %t -archs 2>&1 | FileCheck %s
 # CHECK: i386 unknown(16777367,3)

diff  --git a/llvm/test/tools/llvm-lipo/archs-universal-binary-x86.test b/llvm/test/tools/llvm-lipo/archs-universal-binary-x86.test
index e3b7af29a940..bef267b957d2 100644
--- a/llvm/test/tools/llvm-lipo/archs-universal-binary-x86.test
+++ b/llvm/test/tools/llvm-lipo/archs-universal-binary-x86.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-lipo %t -archs | FileCheck %s
 # CHECK: i386 x86_64
 

diff  --git a/llvm/test/tools/llvm-lipo/create-arch.test b/llvm/test/tools/llvm-lipo/create-arch.test
index bae216566de6..08e9e18ca5e3 100644
--- a/llvm/test/tools/llvm-lipo/create-arch.test
+++ b/llvm/test/tools/llvm-lipo/create-arch.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
-# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml > %t-x86_64.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
+# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml -o %t-x86_64.o
 
 # RUN: llvm-lipo %t-i386.o %t-x86_64.o -create -output %t-universal.o
 # RUN: llvm-lipo %t-i386.o -arch x86_64 %t-x86_64.o -create -output %t-universal-1.o

diff  --git a/llvm/test/tools/llvm-lipo/create-archive-input.test b/llvm/test/tools/llvm-lipo/create-archive-input.test
index 8f4307e9c830..b40312528e05 100644
--- a/llvm/test/tools/llvm-lipo/create-archive-input.test
+++ b/llvm/test/tools/llvm-lipo/create-archive-input.test
@@ -1,6 +1,6 @@
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
-# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml > %t-x86_64.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
+# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml -o %t-x86_64.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
 
 # RUN: llvm-ar cr %t.empty.a
 # RUN: not llvm-lipo %t.empty.a -create -output /dev/null 2>&1 | FileCheck --check-prefix=EMPTY-ARCHIVE %s

diff  --git a/llvm/test/tools/llvm-lipo/create-compute-alignment.test b/llvm/test/tools/llvm-lipo/create-compute-alignment.test
index b986012ea7c7..985b0cdf7e90 100644
--- a/llvm/test/tools/llvm-lipo/create-compute-alignment.test
+++ b/llvm/test/tools/llvm-lipo/create-compute-alignment.test
@@ -1,6 +1,6 @@
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
-# RUN: yaml2obj %p/Inputs/CPU14-slice.yaml > %t-CPU14.o
-# RUN: yaml2obj %p/Inputs/CPU10-slice.yaml > %t-CPU10.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
+# RUN: yaml2obj %p/Inputs/CPU14-slice.yaml -o %t-CPU14.o
+# RUN: yaml2obj %p/Inputs/CPU10-slice.yaml -o %t-CPU10.o
 
 # RUN: llvm-lipo %t-i386.o %t-CPU14.o %t-CPU10.o -create -output %t-universal.o
 

diff  --git a/llvm/test/tools/llvm-lipo/create-default-alignment.test b/llvm/test/tools/llvm-lipo/create-default-alignment.test
index 813230a7e3c4..c90b34f02966 100644
--- a/llvm/test/tools/llvm-lipo/create-default-alignment.test
+++ b/llvm/test/tools/llvm-lipo/create-default-alignment.test
@@ -1,13 +1,13 @@
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
-# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml > %t-x86_64.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
+# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml -o %t-x86_64.o
 
 # RUN: llvm-lipo %t-i386.o %t-x86_64.o -create -output %t-universal-llvm.o
 
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
 # RUN: cmp %t-universal-llvm.o %t-universal.o
 
-# RUN: yaml2obj %p/Inputs/armv7-slice.yaml > %t-armv7.o
-# RUN: yaml2obj %p/Inputs/arm64-slice.yaml > %t-arm64.o
+# RUN: yaml2obj %p/Inputs/armv7-slice.yaml -o %t-armv7.o
+# RUN: yaml2obj %p/Inputs/arm64-slice.yaml -o %t-arm64.o
 
 # RUN: llvm-lipo %t-arm64.o %t-armv7.o %t-universal.o -create -output %t-universal-2.o
 # RUN: llvm-lipo %t-universal-2.o -thin x86_64 -output %t-x86_64_extracted.o

diff  --git a/llvm/test/tools/llvm-lipo/create-executable.test b/llvm/test/tools/llvm-lipo/create-executable.test
index 43e29a71e846..db785a5e4de2 100644
--- a/llvm/test/tools/llvm-lipo/create-executable.test
+++ b/llvm/test/tools/llvm-lipo/create-executable.test
@@ -1,7 +1,7 @@
 # Executable testing is not supported on Windows, since all files are considered executable
 # UNSUPPORTED: system-windows
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
-# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml > %t-x86_64.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
+# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml -o %t-x86_64.o
 
 # RUN: chmod a-x %t-i386.o
 # RUN: chmod a-x %t-x86_64.o

diff  --git a/llvm/test/tools/llvm-lipo/create-invalid-input.test b/llvm/test/tools/llvm-lipo/create-invalid-input.test
index 4bb2e1a56667..5a07a7636e56 100644
--- a/llvm/test/tools/llvm-lipo/create-invalid-input.test
+++ b/llvm/test/tools/llvm-lipo/create-invalid-input.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-32.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-32.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
 
 # RUN: not llvm-lipo %t-32.o -create 2>&1 | FileCheck --check-prefix=NO_OUTPUT %s
 # NO_OUTPUT: error: create expects a single output file to be specified

diff  --git a/llvm/test/tools/llvm-lipo/extract.test b/llvm/test/tools/llvm-lipo/extract.test
index 49f22f46f632..07297cc77d59 100644
--- a/llvm/test/tools/llvm-lipo/extract.test
+++ b/llvm/test/tools/llvm-lipo/extract.test
@@ -1,9 +1,9 @@
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
 
 # RUN: not llvm-lipo %t-universal.o -extract arm64_32 -output /dev/null 2>&1 | FileCheck --check-prefix=ARCH_NOT_IN_FILE %s
 # ARCH_NOT_IN_FILE: does not contain the specified architecture arm64_32
 
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
 # RUN: not llvm-lipo %t-i386.o -extract arm64_32 -output /dev/null 2>&1 | FileCheck --check-prefix=INPUT_NOT_A_FAT_FILE %s
 # INPUT_NOT_A_FAT_FILE: must be a fat file when the -extract option is specified
 

diff  --git a/llvm/test/tools/llvm-lipo/info-invalid.test b/llvm/test/tools/llvm-lipo/info-invalid.test
index fd9f604f5e22..e654fb0b3ff0 100644
--- a/llvm/test/tools/llvm-lipo/info-invalid.test
+++ b/llvm/test/tools/llvm-lipo/info-invalid.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-lipo %t -info 2>&1 | FileCheck %s
 # CHECK: has unsupported binary format
 

diff  --git a/llvm/test/tools/llvm-lipo/info.test b/llvm/test/tools/llvm-lipo/info.test
index 1b0004667a2c..d5fd07344f0f 100644
--- a/llvm/test/tools/llvm-lipo/info.test
+++ b/llvm/test/tools/llvm-lipo/info.test
@@ -1,6 +1,6 @@
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
-# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml > %t-x86_64.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
+# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml -o %t-x86_64.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
 
 # RUN: llvm-lipo %t-universal.o %t-i386.o %t-universal.o %t-x86_64.o -info | FileCheck %s
 # CHECK: Architectures in the fat file:

diff  --git a/llvm/test/tools/llvm-lipo/replace-invalid-input.test b/llvm/test/tools/llvm-lipo/replace-invalid-input.test
index 38e9805bcba7..594594bc2ee6 100644
--- a/llvm/test/tools/llvm-lipo/replace-invalid-input.test
+++ b/llvm/test/tools/llvm-lipo/replace-invalid-input.test
@@ -1,6 +1,6 @@
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-32.o
-# RUN: yaml2obj %p/Inputs/arm64-slice.yaml > %t-arm64.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-32.o
+# RUN: yaml2obj %p/Inputs/arm64-slice.yaml -o %t-arm64.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
 
 # RUN: not llvm-lipo %t-universal.o -replace %t-32.o 2>&1 | FileCheck --check-prefix=MISSING_ARG %s
 # MISSING_ARG: error: replace is missing an argument: expects -replace arch_type file_name

diff  --git a/llvm/test/tools/llvm-lipo/replace-universal-binary.test b/llvm/test/tools/llvm-lipo/replace-universal-binary.test
index f9419ef18f34..a3ce6a9fcb14 100644
--- a/llvm/test/tools/llvm-lipo/replace-universal-binary.test
+++ b/llvm/test/tools/llvm-lipo/replace-universal-binary.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj %p/Inputs/armv7-slice-big.yaml > %t-armv7big.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-armv7-arm64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/armv7-slice-big.yaml -o %t-armv7big.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-armv7-arm64-universal.yaml -o %t-universal.o
 
 # RUN: llvm-lipo %t-universal.o -replace armv7 %t-armv7big.o -o %t.o
 # RUN: llvm-objdump %t.o -m --universal-headers | FileCheck --check-prefix=ARMV7_BIG %s
@@ -20,8 +20,8 @@
 # ARMV7_BIG: size 516
 # ARMV7_BIG: align 2^14 (16384)
 
-# RUN: yaml2obj %p/Inputs/armv7-slice.yaml > %t-armv7.o
-# RUN: yaml2obj %p/Inputs/armv7_i386_non_default_alignment.yaml > %t-universal-align.o
+# RUN: yaml2obj %p/Inputs/armv7-slice.yaml -o %t-armv7.o
+# RUN: yaml2obj %p/Inputs/armv7_i386_non_default_alignment.yaml -o %t-universal-align.o
 
 # RUN: llvm-lipo %t-universal-align.o -replace armv7 %t-armv7.o -o %t2.o
 # RUN: llvm-objdump %t2.o -m --universal-headers | FileCheck --check-prefix=ARMV7_ALIGN_SWAP %s

diff  --git a/llvm/test/tools/llvm-lipo/segalign-invalid-input.test b/llvm/test/tools/llvm-lipo/segalign-invalid-input.test
index 3556ddfc8562..aa6aceb77cc7 100644
--- a/llvm/test/tools/llvm-lipo/segalign-invalid-input.test
+++ b/llvm/test/tools/llvm-lipo/segalign-invalid-input.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj %p/Inputs/arm64-slice.yaml > %t-arm64.o
-# RUN: yaml2obj %p/Inputs/armv7-slice.yaml > %t-armv7.o
+# RUN: yaml2obj %p/Inputs/arm64-slice.yaml -o %t-arm64.o
+# RUN: yaml2obj %p/Inputs/armv7-slice.yaml -o %t-armv7.o
 
 # RUN: not llvm-lipo %t-armv7.o %t-arm64.o -create -o %t.o -segalign a 2>&1 | FileCheck --check-prefix=MISSING_ARG %s
 # MISSING_ARG: error: segalign is missing an argument: expects -segalign arch_type alignment_value

diff  --git a/llvm/test/tools/llvm-lipo/segalign.test b/llvm/test/tools/llvm-lipo/segalign.test
index 30fc43ad01f6..0cb52669a918 100644
--- a/llvm/test/tools/llvm-lipo/segalign.test
+++ b/llvm/test/tools/llvm-lipo/segalign.test
@@ -1,6 +1,6 @@
-# RUN: yaml2obj %p/Inputs/arm64-slice.yaml > %t-arm64.o
-# RUN: yaml2obj %p/Inputs/armv7-slice.yaml > %t-armv7.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/arm64-slice.yaml -o %t-arm64.o
+# RUN: yaml2obj %p/Inputs/armv7-slice.yaml -o %t-armv7.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
 
 # segalign expects an architecture type followed by a hexadecimal value for alignment
 
@@ -65,8 +65,8 @@
 # RUN: llvm-lipo %t2.o -thin armv7 -o %thin-armv7.o
 # RUN: cmp %thin-armv7.o %t-armv7.o
 
-# RUN: yaml2obj %p/Inputs/armv7-slice-big.yaml > %t-armv7-big.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-armv7-arm64-universal.yaml > %t-universal-big.o
+# RUN: yaml2obj %p/Inputs/armv7-slice-big.yaml -o %t-armv7-big.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-armv7-arm64-universal.yaml -o %t-universal-big.o
 
 # RUN: llvm-lipo %t-universal-big.o -replace armv7 %t-armv7-big.o -o %t3.o -segalign armv7 4
 # RUN: llvm-objdump %t3.o -m --universal-headers | FileCheck --check-prefix=CHECK_REPLACE_ARMV7 %s

diff  --git a/llvm/test/tools/llvm-lipo/thin-executable-universal-binary.test b/llvm/test/tools/llvm-lipo/thin-executable-universal-binary.test
index 20dd1dbc2bef..40cf9cc7eab9 100644
--- a/llvm/test/tools/llvm-lipo/thin-executable-universal-binary.test
+++ b/llvm/test/tools/llvm-lipo/thin-executable-universal-binary.test
@@ -1,6 +1,6 @@
 # Executable testing is not supported on Windows, since all files are considered executable
 # UNSUPPORTED: system-windows
-# RUN: yaml2obj %s > %t-universal.o
+# RUN: yaml2obj %s -o %t-universal.o
 
 # RUN: chmod a-x %t-universal.o
 # RUN: llvm-lipo %t-universal.o -thin i386 -output %t32.o

diff  --git a/llvm/test/tools/llvm-lipo/thin-macho-binary.test b/llvm/test/tools/llvm-lipo/thin-macho-binary.test
index e4fa08cb329d..b7e7918a062a 100644
--- a/llvm/test/tools/llvm-lipo/thin-macho-binary.test
+++ b/llvm/test/tools/llvm-lipo/thin-macho-binary.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # RUN: not llvm-lipo %t -thin i386 2>&1 | FileCheck --check-prefix=NO_OUTPUT %s
 # NO_OUTPUT: error: thin expects a single output file

diff  --git a/llvm/test/tools/llvm-lipo/thin-universal-binary.test b/llvm/test/tools/llvm-lipo/thin-universal-binary.test
index 8edb68682f04..32825831a51f 100644
--- a/llvm/test/tools/llvm-lipo/thin-universal-binary.test
+++ b/llvm/test/tools/llvm-lipo/thin-universal-binary.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # RUN: not llvm-lipo %t -thin arm64_32 -output %t.out 2>&1 | FileCheck --check-prefix=ARCH_NOT_IN_FILE %s
 # ARCH_NOT_IN_FILE: does not contain the specified architecture arm64_32 to thin it to
@@ -6,9 +6,9 @@
 # RUN: not llvm-lipo %t -thin aarch101 -output %t.out 2>&1 | FileCheck --check-prefix=INVALID_ARCH %s
 # INVALID_ARCH: Invalid architecture: aarch101
 
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
 # RUN: llvm-lipo %t-universal.o -thin i386 -output %t32.o
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-basic32.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-basic32.o
 # RUN: cmp %t32.o %t-basic32.o
 
 --- !fat-mach-o

diff  --git a/llvm/test/tools/llvm-lipo/verify-arch-macho-binary.test b/llvm/test/tools/llvm-lipo/verify-arch-macho-binary.test
index 4ab3e59d0d90..9f7c0c279f65 100644
--- a/llvm/test/tools/llvm-lipo/verify-arch-macho-binary.test
+++ b/llvm/test/tools/llvm-lipo/verify-arch-macho-binary.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # RUN: llvm-lipo %t -verify_arch i386
 # RUN: llvm-lipo %t --verify_arch i386

diff  --git a/llvm/test/tools/llvm-lipo/verify-arch-universal-binary.test b/llvm/test/tools/llvm-lipo/verify-arch-universal-binary.test
index 1f0381ebf122..6b87a943fdc6 100644
--- a/llvm/test/tools/llvm-lipo/verify-arch-universal-binary.test
+++ b/llvm/test/tools/llvm-lipo/verify-arch-universal-binary.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # RUN: llvm-lipo %t -verify_arch i386
 # RUN: llvm-lipo %t -verify_arch i386 x86_64

diff  --git a/llvm/test/tools/llvm-nm/AArch64/special-syms.test b/llvm/test/tools/llvm-nm/AArch64/special-syms.test
index afc706bf8fb2..8322cc4df86f 100644
--- a/llvm/test/tools/llvm-nm/AArch64/special-syms.test
+++ b/llvm/test/tools/llvm-nm/AArch64/special-syms.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # Test --special-syms flag. Currently this flag is a no-op, so outputs with and without
 # this flag should be identical. GNU nm doesn't show ARM and AArch64 special symbols
 # without --special-syms, so this test is to be changed when/if we decide to implement

diff  --git a/llvm/test/tools/llvm-nm/X86/nm-no-symbols-local-only.yaml b/llvm/test/tools/llvm-nm/X86/nm-no-symbols-local-only.yaml
index 10441661cd25..0a0887b13afc 100644
--- a/llvm/test/tools/llvm-nm/X86/nm-no-symbols-local-only.yaml
+++ b/llvm/test/tools/llvm-nm/X86/nm-no-symbols-local-only.yaml
@@ -1,6 +1,6 @@
 ## When a file contains only local symbols the "no symbols" error should not
 ## be shown, so we expect the output to be completely empty.
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-nm %t.o 2>&1 | count 0
 
 !ELF

diff  --git a/llvm/test/tools/llvm-nm/X86/nm-no-symbols.test b/llvm/test/tools/llvm-nm/X86/nm-no-symbols.test
index bb4f0b03a47e..83bc0a00699b 100644
--- a/llvm/test/tools/llvm-nm/X86/nm-no-symbols.test
+++ b/llvm/test/tools/llvm-nm/X86/nm-no-symbols.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-nm %t.o 2>&1 | FileCheck %s -DFILE=%t.o
 
 !ELF

diff  --git a/llvm/test/tools/llvm-nm/X86/portability.test b/llvm/test/tools/llvm-nm/X86/portability.test
index ca8c4781f0b8..a3fe13a6a69e 100644
--- a/llvm/test/tools/llvm-nm/X86/portability.test
+++ b/llvm/test/tools/llvm-nm/X86/portability.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-nm %t.o --portability | FileCheck %s --strict-whitespace --match-full-lines
 # RUN: llvm-nm %t.o -P | FileCheck %s --strict-whitespace --match-full-lines
 

diff  --git a/llvm/test/tools/llvm-nm/debug-syms.test b/llvm/test/tools/llvm-nm/debug-syms.test
index d10308002a1d..6a71aed41338 100644
--- a/llvm/test/tools/llvm-nm/debug-syms.test
+++ b/llvm/test/tools/llvm-nm/debug-syms.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-nm --debug-syms %t.o | FileCheck %s --implicit-check-not U
 # RUN: llvm-nm -a %t.o | FileCheck %s --implicit-check-not U
 

diff  --git a/llvm/test/tools/llvm-nm/format-sysv-layout.test b/llvm/test/tools/llvm-nm/format-sysv-layout.test
index 085e8380da68..33d1b396e8bb 100644
--- a/llvm/test/tools/llvm-nm/format-sysv-layout.test
+++ b/llvm/test/tools/llvm-nm/format-sysv-layout.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-nm %t.o --debug-syms --format=sysv | FileCheck %s -DFILE=%t.o --strict-whitespace
 # RUN: llvm-nm %t.o --debug-syms -f=sysv | FileCheck %s -DFILE=%t.o --strict-whitespace
 

diff  --git a/llvm/test/tools/llvm-nm/format-sysv-section.test b/llvm/test/tools/llvm-nm/format-sysv-section.test
index 67ed1a8f7db9..6303f6008ac9 100644
--- a/llvm/test/tools/llvm-nm/format-sysv-section.test
+++ b/llvm/test/tools/llvm-nm/format-sysv-section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj --docnum=1 %s > %t1.o
+# RUN: yaml2obj --docnum=1 %s -o %t1.o
 # RUN: llvm-nm %t1.o --format=sysv | FileCheck %s
 
 --- !ELF
@@ -38,7 +38,7 @@ Symbols:
 ## (sh_name offset goes past the end of the sections name string table).
 ## We test that we can still print a reasonable output and don't crash/assert.
 
-# RUN: yaml2obj --docnum=2 %s > %t2.o
+# RUN: yaml2obj --docnum=2 %s -o %t2.o
 # RUN: llvm-nm %t2.o --format=sysv | FileCheck %s --check-prefix=ERR
 
 # ERR: foo |0000000000000000| ? | NOTYPE|0000000000000000| |

diff  --git a/llvm/test/tools/llvm-nm/format-sysv-type.test b/llvm/test/tools/llvm-nm/format-sysv-type.test
index 68b376aecab1..36b85a099152 100644
--- a/llvm/test/tools/llvm-nm/format-sysv-type.test
+++ b/llvm/test/tools/llvm-nm/format-sysv-type.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-nm %t.o --debug-syms --format=sysv | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-nm/no-sort.test b/llvm/test/tools/llvm-nm/no-sort.test
index d74055875833..0b42de784b2d 100644
--- a/llvm/test/tools/llvm-nm/no-sort.test
+++ b/llvm/test/tools/llvm-nm/no-sort.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-nm %t.o | FileCheck %s --check-prefix=DEFAULT
 # RUN: llvm-nm --no-sort %t.o | FileCheck %s --check-prefix=NOSORT
 # RUN: llvm-nm -p %t.o | FileCheck %s --check-prefix=NOSORT

diff  --git a/llvm/test/tools/llvm-nm/numeric-sort.test b/llvm/test/tools/llvm-nm/numeric-sort.test
index 26a6bcbcbda2..a3b32ecccc13 100644
--- a/llvm/test/tools/llvm-nm/numeric-sort.test
+++ b/llvm/test/tools/llvm-nm/numeric-sort.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-nm %t.o | FileCheck %s --check-prefix=DEFAULT
 # RUN: llvm-nm --numeric-sort %t.o | FileCheck %s --check-prefix=NUMERIC
 # RUN: llvm-nm -n %t.o | FileCheck %s --check-prefix=NUMERIC

diff  --git a/llvm/test/tools/llvm-nm/undefined-only.test b/llvm/test/tools/llvm-nm/undefined-only.test
index 99fa519e70a6..720ded7f15f5 100644
--- a/llvm/test/tools/llvm-nm/undefined-only.test
+++ b/llvm/test/tools/llvm-nm/undefined-only.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-nm --undefined-only %t.o | FileCheck %s --implicit-check-not=symbol_defined
 
 !ELF

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/add-gnu-debuglink.test b/llvm/test/tools/llvm-objcopy/COFF/add-gnu-debuglink.test
index 7afe4cddd611..b8d80d95b2f7 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/add-gnu-debuglink.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/add-gnu-debuglink.test
@@ -1,4 +1,4 @@
-RUN: yaml2obj %p/Inputs/x86_64-exe.yaml > %t.in123.exe
+RUN: yaml2obj %p/Inputs/x86_64-exe.yaml -o %t.in123.exe
 
 # Using a debuglink filename with a length that is a multiple of 4, to
 # showcase padding in CONTENTS below.

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/add-section.test b/llvm/test/tools/llvm-objcopy/COFF/add-section.test
index a82756ef8850..e4938db9135f 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/add-section.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/add-section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 ## Test that llvm-objcopy adds a section to the given object with expected
 ## contents.
@@ -35,7 +35,7 @@
 ## Test that llvm-objcopy can add a section to an object with extended
 ## relocations.
 # RUN: %python %p/../Inputs/ungzip.py %p/Inputs/x86_64-obj-xrelocs.yaml.gz > %t.xrelocs.yaml
-# RUN: yaml2obj %t.xrelocs.yaml > %t.xrelocs.obj
+# RUN: yaml2obj %t.xrelocs.yaml -o %t.xrelocs.obj
 # RUN: llvm-objcopy --add-section=.test.section=%t.sec %t.xrelocs.obj %t1.xrelocs.obj
 # RUN: llvm-readobj --file-headers --sections --section-data %t1.xrelocs.obj | FileCheck %s --check-prefixes=CHECK-EXTENDED-RELOCS
 

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/basic-copy.test b/llvm/test/tools/llvm-objcopy/COFF/basic-copy.test
index ecdf430faf19..351cd00b6512 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/basic-copy.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/basic-copy.test
@@ -17,31 +17,31 @@ following aspects:
 - Alignment of section data
 - Checksums
 
-RUN: yaml2obj %p/Inputs/i386-obj.yaml > %t.i386.o
+RUN: yaml2obj %p/Inputs/i386-obj.yaml -o %t.i386.o
 RUN: llvm-objcopy %t.i386.o %t.i386-copy.o
 RUN: obj2yaml %t.i386.o > %t.i386.o.yaml
 RUN: obj2yaml %t.i386-copy.o > %t.i386-copy.o.yaml
 RUN: cmp %t.i386.o.yaml %t.i386-copy.o.yaml
 
-RUN: yaml2obj %p/Inputs/x86_64-obj.yaml > %t.x86_64.o
+RUN: yaml2obj %p/Inputs/x86_64-obj.yaml -o %t.x86_64.o
 RUN: llvm-objcopy %t.x86_64.o %t.x86_64-copy.o
 RUN: obj2yaml %t.x86_64.o > %t.x86_64.o.yaml
 RUN: obj2yaml %t.x86_64-copy.o > %t.x86_64-copy.o.yaml
 RUN: cmp %t.x86_64.o.yaml %t.x86_64-copy.o.yaml
 
-RUN: yaml2obj %p/Inputs/i386-exe.yaml > %t.i386.exe
+RUN: yaml2obj %p/Inputs/i386-exe.yaml -o %t.i386.exe
 RUN: llvm-objcopy %t.i386.exe %t.i386-copy.exe
 RUN: obj2yaml %t.i386.exe > %t.i386.exe.yaml
 RUN: obj2yaml %t.i386-copy.exe > %t.i386-copy.exe.yaml
 RUN: cmp %t.i386.exe.yaml %t.i386-copy.exe.yaml
 
-RUN: yaml2obj %p/Inputs/x86_64-exe.yaml > %t.x86_64.exe
+RUN: yaml2obj %p/Inputs/x86_64-exe.yaml -o %t.x86_64.exe
 RUN: llvm-objcopy %t.x86_64.exe %t.x86_64-copy.exe
 RUN: obj2yaml %t.x86_64.exe > %t.x86_64.exe.yaml
 RUN: obj2yaml %t.x86_64-copy.exe > %t.x86_64-copy.exe.yaml
 RUN: cmp %t.x86_64.exe.yaml %t.x86_64-copy.exe.yaml
 
-RUN: yaml2obj %p/Inputs/no-symbols.yaml > %t.no-symbols.o
+RUN: yaml2obj %p/Inputs/no-symbols.yaml -o %t.no-symbols.o
 RUN: llvm-objcopy %t.no-symbols.o %t.no-symbols-copy.o
 RUN: obj2yaml %t.no-symbols.o > %t.no-symbols.o.yaml
 RUN: obj2yaml %t.no-symbols-copy.o > %t.no-symbols-copy.o.yaml

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/discard-all.test b/llvm/test/tools/llvm-objcopy/COFF/discard-all.test
index 5d7d5cef2f36..1576fa944eee 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/discard-all.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/discard-all.test
@@ -1,4 +1,4 @@
-RUN: yaml2obj %p/Inputs/discard-locals.yaml > %t.in.o
+RUN: yaml2obj %p/Inputs/discard-locals.yaml -o %t.in.o
 
 RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
 

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/only-keep-debug.test b/llvm/test/tools/llvm-objcopy/COFF/only-keep-debug.test
index c2a6afef7ce9..66cdeea3006b 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/only-keep-debug.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/only-keep-debug.test
@@ -1,4 +1,4 @@
-RUN: yaml2obj %p/Inputs/only-keep-sections.yaml > %t.in.exe
+RUN: yaml2obj %p/Inputs/only-keep-sections.yaml -o %t.in.exe
 
 RUN: llvm-objcopy --only-keep-debug %t.in.exe %t.out.exe
 RUN: llvm-readobj --sections %t.out.exe | FileCheck %s --check-prefix=SECTIONS

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/only-section.test b/llvm/test/tools/llvm-objcopy/COFF/only-section.test
index 42492ed80ff9..8610828d05fb 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/only-section.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/only-section.test
@@ -1,4 +1,4 @@
-RUN: yaml2obj %p/Inputs/only-keep-sections.yaml > %t.in.exe
+RUN: yaml2obj %p/Inputs/only-keep-sections.yaml -o %t.in.exe
 
 RUN: llvm-objcopy --only-section .debug_discardable %t.in.exe %t.out.exe
 RUN: llvm-objdump --section-headers -t %t.out.exe | FileCheck %s --check-prefixes=SECTIONS,SECTIONS-DEBUG,SYMBOLS,SYMBOLS-DEBUG

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/patch-debug-dir.test b/llvm/test/tools/llvm-objcopy/COFF/patch-debug-dir.test
index 82af18311c8a..19685be40a46 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/patch-debug-dir.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/patch-debug-dir.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.in.exe
+# RUN: yaml2obj %s -o %t.in.exe
 
 # RUN: llvm-objdump -s %t.in.exe | FileCheck %s --check-prefixes=CONTENTS,CONTENTS-PRE
 # RUN: llvm-readobj --sections %t.in.exe | FileCheck %s --check-prefixes=SECTIONS,SECTIONS-PRE

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/remove-section.test b/llvm/test/tools/llvm-objcopy/COFF/remove-section.test
index 58ff574181ac..064929191436 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/remove-section.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/remove-section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.in.o
+# RUN: yaml2obj %s -o %t.in.o
 #
 # RUN: llvm-objdump -section-headers %t.in.o | FileCheck %s --check-prefixes=SECTIONS-PRE
 # RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS-PRE

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/strip-all.test b/llvm/test/tools/llvm-objcopy/COFF/strip-all.test
index 5e3ed9c40918..e85aee8884ac 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/strip-all.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/strip-all.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.in.o
+# RUN: yaml2obj %s -o %t.in.o
 
 # RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
 

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/strip-debug.test b/llvm/test/tools/llvm-objcopy/COFF/strip-debug.test
index 97fa96aac70d..924a4d314e2e 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/strip-debug.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/strip-debug.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.in.o
+# RUN: yaml2obj %s -o %t.in.o
 #
 # RUN: llvm-objdump --section-headers %t.in.o | FileCheck %s --check-prefixes=SECTIONS,SECTIONS-PRE
 # RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/strip-reloc-symbol.test b/llvm/test/tools/llvm-objcopy/COFF/strip-reloc-symbol.test
index 9be4ab83521e..d197e647c8af 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/strip-reloc-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/strip-reloc-symbol.test
@@ -1,4 +1,4 @@
-RUN: yaml2obj %p/Inputs/strip-symbols.yaml > %t.o
+RUN: yaml2obj %p/Inputs/strip-symbols.yaml -o %t.o
 RUN: not llvm-objcopy -N foo %t.o 2>&1 | FileCheck %s --check-prefix=ERROR
 RUN: not llvm-objcopy --strip-symbol foo %t.o 2>&1 | FileCheck %s --check-prefix=ERROR
 

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/strip-symbol.test b/llvm/test/tools/llvm-objcopy/COFF/strip-symbol.test
index 5eb644261798..ab1251cfa7c3 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/strip-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/strip-symbol.test
@@ -1,4 +1,4 @@
-RUN: yaml2obj %p/Inputs/strip-symbols.yaml > %t.in.o
+RUN: yaml2obj %p/Inputs/strip-symbols.yaml -o %t.in.o
 
 RUN: llvm-readobj -r %t.in.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-PRE
 RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/strip-unneeded.test b/llvm/test/tools/llvm-objcopy/COFF/strip-unneeded.test
index ca3efe4a3138..d6cfeaa0782a 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/strip-unneeded.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/strip-unneeded.test
@@ -1,4 +1,4 @@
-RUN: yaml2obj %p/Inputs/discard-locals.yaml > %t.in.o
+RUN: yaml2obj %p/Inputs/discard-locals.yaml -o %t.in.o
 
 RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
 

diff  --git a/llvm/test/tools/llvm-objcopy/COFF/weak-external.test b/llvm/test/tools/llvm-objcopy/COFF/weak-external.test
index b5a311fbfb6c..07e02111af94 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/weak-external.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/weak-external.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.in.o
+# RUN: yaml2obj %s -o %t.in.o
 
 # RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/abs-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/abs-symbol.test
index 62c5873ba550..8d86143404b5 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/abs-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/abs-symbol.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/add-gnu-debuglink.test b/llvm/test/tools/llvm-objcopy/ELF/add-gnu-debuglink.test
index 330571c33777..b4ac99d1c71a 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/add-gnu-debuglink.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/add-gnu-debuglink.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: printf 0000 > %t.blob
 # RUN: llvm-objcopy --add-gnu-debuglink=%t.blob %t %t2
 # RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/add-note.test b/llvm/test/tools/llvm-objcopy/ELF/add-note.test
index b45623078463..84cb7db1788f 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/add-note.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/add-note.test
@@ -11,7 +11,7 @@
 # RUN: echo -e -n "\x08\x09\x0a\x0b" >> %t-note.bin
 # RUN: echo -e -n "\x0c\x0d\x0e\x0f" >> %t-note.bin
 
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-objcopy --add-section=.note.gnu.build-id=%t-note.bin %t.o %t-with-note.o
 # RUN: llvm-readobj --notes %t-with-note.o | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/add-section-remove.test b/llvm/test/tools/llvm-objcopy/ELF/add-section-remove.test
index ad41d74947d4..3aaf981cc71d 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/add-section-remove.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/add-section-remove.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: echo 0000 > %t.sec
 # RUN: llvm-objcopy -R .test2 --add-section=.test2=%t.sec %t %t2
 # RUN: llvm-readobj --file-headers --sections --section-data %t2 | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/add-section-special.test b/llvm/test/tools/llvm-objcopy/ELF/add-section-special.test
index e83cd51810f8..3c3cb9fc0e9d 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/add-section-special.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/add-section-special.test
@@ -2,7 +2,7 @@
 # By default, sections are SHT_PROGBITS, but .note sections (excluding
 # .note.GNU-stack) are SHT_NOTE sections.
 
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-objcopy --add-section=.foo=/dev/null %t.o %t-foo.o
 # RUN: llvm-objcopy --add-section=.note.foo=/dev/null %t.o %t-regular-note.o
 # RUN: llvm-objcopy --add-section=.note.GNU-stack=/dev/null %t.o %t-gnu-stack.o

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/add-section.test b/llvm/test/tools/llvm-objcopy/ELF/add-section.test
index e930d2754b86..290761f82bc1 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/add-section.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/add-section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy -O binary -j .test2 %t %t.sec
 # RUN: llvm-objcopy -R .test2 %t %t2
 # RUN: llvm-objcopy --add-section=.test2=%t.sec %t2 %t3

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/armexidx-link.test b/llvm/test/tools/llvm-objcopy/ELF/armexidx-link.test
index 734f43632f85..be4428aa93fb 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/armexidx-link.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/armexidx-link.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --remove-section=.text.bar %t %t2
 # RUN: llvm-readobj --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/bad-build-id.test b/llvm/test/tools/llvm-objcopy/ELF/bad-build-id.test
index 13c4b1685e01..7adbd2fbfa9c 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/bad-build-id.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/bad-build-id.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy --build-id-link-dir=%t-dir --build-id-link-input=.debug %t 2>&1 >/dev/null | FileCheck %s
 
 # CHECK: build ID is smaller than two bytes

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/bad-output-format.test b/llvm/test/tools/llvm-objcopy/ELF/bad-output-format.test
index 932584cc8cc0..df1a446ae5fc 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/bad-output-format.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/bad-output-format.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 
 # RUN: not llvm-objcopy -O xyz %t.o %t.2.o 2>&1 \
 # RUN:   | FileCheck %s --check-prefix=BAD-OUTPUT-FORMAT

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/basic-archive-copy.test b/llvm/test/tools/llvm-objcopy/ELF/basic-archive-copy.test
index ada141471fbd..89994ad3da9d 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/basic-archive-copy.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/basic-archive-copy.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # RUN: rm -f %t.a
 # RUN: llvm-ar crs %t.a %t

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/basic-copy.test b/llvm/test/tools/llvm-objcopy/ELF/basic-copy.test
index b6b0bcc612be..0eacb62a94ca 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/basic-copy.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/basic-copy.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/basic-keep.test b/llvm/test/tools/llvm-objcopy/ELF/basic-keep.test
index 8488a2679b38..2790773b4b3d 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/basic-keep.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/basic-keep.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --strip-non-alloc --keep-section=.test %t %t2
 # RUN: llvm-strip --strip-all --keep-section=.test %t -o %t3
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/basic-only-section.test b/llvm/test/tools/llvm-objcopy/ELF/basic-only-section.test
index f95ea3891167..fa959c4e9d0f 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/basic-only-section.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/basic-only-section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --only-section=.test %t %t2
 # RUN: llvm-objcopy -j .test %t %t3
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/basic-relocations.test b/llvm/test/tools/llvm-objcopy/ELF/basic-relocations.test
index ac1831a23e11..9ffe13d67375 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/basic-relocations.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/basic-relocations.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --relocations %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/build-id-link-dir.test b/llvm/test/tools/llvm-objcopy/ELF/build-id-link-dir.test
index 9fe9a68cfdb4..c99d0efdf31b 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/build-id-link-dir.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/build-id-link-dir.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: mkdir -p %t-dir
 
 # RUN: llvm-objcopy --build-id-link-dir=%t-dir %t %t2

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/cannot-delete-dest.test b/llvm/test/tools/llvm-objcopy/ELF/cannot-delete-dest.test
index 1853049c8ace..68e547fbb984 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/cannot-delete-dest.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/cannot-delete-dest.test
@@ -1,5 +1,5 @@
 # REQUIRES: system-windows
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: rm -f %t2.o
 # RUN: cp %t.o %t2.o
 # RUN: attrib +r %t2.o

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/common-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/common-symbol.test
index 42d563975d1a..98e73d2c0e56 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/common-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/common-symbol.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/copy-osabi.test b/llvm/test/tools/llvm-objcopy/ELF/copy-osabi.test
index 75a22bc9bdfa..f53ec7216d06 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/copy-osabi.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/copy-osabi.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --file-headers %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test b/llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
index 9ebbe12ce8d9..720dcbfa99b8 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
@@ -2,7 +2,7 @@
 # and DWO output.
 # Note that we don't actually need any DWARF to produce the DWO file.
 
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 
 # Without --output-format, the format should match the input.
 # RUN: llvm-objcopy %t.o %t.default.o --split-dwo=%t.default.dwo

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/cross-arch-sections-symbols.test b/llvm/test/tools/llvm-objcopy/ELF/cross-arch-sections-symbols.test
index d2da14e60a45..937a3e6aa268 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/cross-arch-sections-symbols.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/cross-arch-sections-symbols.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # Preserve input to verify it is not modified.
 # RUN: cp %t.o %t-copy.o
 # RUN: llvm-objcopy %t.o -O elf64-x86-64 %t.2.o

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/deterministic-archive.test b/llvm/test/tools/llvm-objcopy/ELF/deterministic-archive.test
index fd520fb9ed7f..b102a4162650 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/deterministic-archive.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/deterministic-archive.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 
 # Create an archive, specifying U so that timestamps/etc. are preserved.
 # We only test timestamps as a proxy for full deterministic writing; i.e. we

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/discard-all.test b/llvm/test/tools/llvm-objcopy/ELF/discard-all.test
index f27c16179965..50cad3ae9f53 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/discard-all.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/discard-all.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: cp %t %t1
 # RUN: llvm-objcopy --discard-all %t %t2
 # Verify that llvm-objcopy has not modified the input.

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test b/llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test
index 5fce41d2fd7c..3658eb376010 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy --discard-locals %t %t2 2>&1 | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/discard-locals.test b/llvm/test/tools/llvm-objcopy/ELF/discard-locals.test
index ef8a293f0df7..4aba1cd1c782 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/discard-locals.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/discard-locals.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: cp %t %t1
 # RUN: llvm-objcopy --discard-locals %t %t2
 # Verify that llvm-objcopy has not modified the input.

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/discard-mix-local-and-all.test b/llvm/test/tools/llvm-objcopy/ELF/discard-mix-local-and-all.test
index 8bb39f6a6153..986eb9c8239a 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/discard-mix-local-and-all.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/discard-mix-local-and-all.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # Establish baseline objects for further checks. --discard-locals only discards
 # compiler-generated local symbols (starting with .L), --discard-all discards
 # all regular local symbols.

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/dump-section.test b/llvm/test/tools/llvm-objcopy/ELF/dump-section.test
index 1e56c72622d6..176cc791801a 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/dump-section.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/dump-section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy -O binary -j .text %t %t2
 # RUN: llvm-objcopy -O binary --only-section .text %t %t3
 # RUN: llvm-objcopy --dump-section .text=%t4 %t %t5

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/dynamic-relocations.test b/llvm/test/tools/llvm-objcopy/ELF/dynamic-relocations.test
index 9c4d5b70cead..000cf5675bad 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/dynamic-relocations.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/dynamic-relocations.test
@@ -1,7 +1,7 @@
 ## Check that llvm-objcopy can handle an object
 ## containing dynamic relocations properly.
 
-# RUN: yaml2obj %s > %t1
+# RUN: yaml2obj %s -o %t1
 # RUN: llvm-objcopy %t1 %t2
 # RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/dynrelocsec-remove-shinfo-reference.test b/llvm/test/tools/llvm-objcopy/ELF/dynrelocsec-remove-shinfo-reference.test
index a66b38d59f7e..b5fd2ee3bc69 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/dynrelocsec-remove-shinfo-reference.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/dynrelocsec-remove-shinfo-reference.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy -R .got.plt %t %t2
 
 ## .rela.plt is a dynamic relocation section that has a connection

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/dynrelocsec-remove-shlink-reference.test b/llvm/test/tools/llvm-objcopy/ELF/dynrelocsec-remove-shlink-reference.test
index 2ff68de381bf..3cef37d85c94 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/dynrelocsec-remove-shlink-reference.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/dynrelocsec-remove-shlink-reference.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 ## Check we cannot remove the .dynsym symbol table because dynamic
 ## relocation section .rela.dyn still references it via sh_link field.

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/dynstr.test b/llvm/test/tools/llvm-objcopy/ELF/dynstr.test
index 68ec586649eb..dab78df85d61 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/dynstr.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/dynstr.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/elf32be.test b/llvm/test/tools/llvm-objcopy/ELF/elf32be.test
index 374b7994ae33..a5f97389d94d 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/elf32be.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/elf32be.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/elf32le.test b/llvm/test/tools/llvm-objcopy/ELF/elf32le.test
index b2cb40ce1411..0c520e9975a7 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/elf32le.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/elf32le.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/elf64be.test b/llvm/test/tools/llvm-objcopy/ELF/elf64be.test
index 97977b0c195e..fabee534790f 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/elf64be.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/elf64be.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/empty-section.test b/llvm/test/tools/llvm-objcopy/ELF/empty-section.test
index 5c55383ac09f..4216c5d9b57c 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/empty-section.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/empty-section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/explicit-keep-remove.test b/llvm/test/tools/llvm-objcopy/ELF/explicit-keep-remove.test
index 6512afac0cf1..60a88559bbe2 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/explicit-keep-remove.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/explicit-keep-remove.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy -R=.test --keep-section=.test %t %t2
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/explicit-only-section-remove.test b/llvm/test/tools/llvm-objcopy/ELF/explicit-only-section-remove.test
index 5baf845abe7d..d52e3440325e 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/explicit-only-section-remove.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/explicit-only-section-remove.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy -R=.test --only-section=.test %t %t2
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/fail-no-output-directory.test b/llvm/test/tools/llvm-objcopy/ELF/fail-no-output-directory.test
index 0eb39b9022b4..0a1784b860d6 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/fail-no-output-directory.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/fail-no-output-directory.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy %t no/such/dir 2>&1 | FileCheck %s
 # Don't check "No such file" which is OS dependent.
 # CHECK: 'no/such/dir':

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/globalize.test b/llvm/test/tools/llvm-objcopy/ELF/globalize.test
index e1dcc04186f0..8869e2d7bc02 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/globalize.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/globalize.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --globalize-symbol Global \
 # RUN:   --globalize-symbol Local \
 # RUN:   --globalize-symbol Weak \

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/group-addr-misaligned.test b/llvm/test/tools/llvm-objcopy/ELF/group-addr-misaligned.test
index bedef1ca7a5d..98e8110efed3 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/group-addr-misaligned.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/group-addr-misaligned.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy %t %t2 2>&1 | FileCheck %s
 # CHECK: error: invalid alignment 1 of group section '.group'
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/group-big-endian.test b/llvm/test/tools/llvm-objcopy/ELF/group-big-endian.test
index e76e6e5d207c..b8932736acc5 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/group-big-endian.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/group-big-endian.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --remove-section=.text.bar %t %t2
 # RUN: llvm-readobj --elf-section-groups %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/group-reorder.test b/llvm/test/tools/llvm-objcopy/ELF/group-reorder.test
index 25c57bea220f..6e0d4b9518cc 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/group-reorder.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/group-reorder.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-objcopy %t.o %t.2.o
 # RUN: llvm-readelf --elf-section-groups --sections %t.o | FileCheck %s --check-prefix=IN
 # RUN: llvm-readelf --elf-section-groups --sections %t.2.o | FileCheck %s --check-prefix=OUT

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/group-unchanged.test b/llvm/test/tools/llvm-objcopy/ELF/group-unchanged.test
index f5f74b414bb1..e7d9664fe2f3 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/group-unchanged.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/group-unchanged.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --remove-section=.text.bar %t %t2
 # RUN: llvm-readobj --elf-section-groups %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/group.test b/llvm/test/tools/llvm-objcopy/ELF/group.test
index ea84f25eb0f2..f82834edbd92 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/group.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/group.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --remove-section=.text.bar %t %t2
 # RUN: llvm-readobj --elf-section-groups %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/hexagon-unsupported-on-x86.test b/llvm/test/tools/llvm-objcopy/ELF/hexagon-unsupported-on-x86.test
index 70a477c6e36a..749f6b10b825 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/hexagon-unsupported-on-x86.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/hexagon-unsupported-on-x86.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy %t %t2 2>&1 >/dev/null | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/keep-file-symbols.test b/llvm/test/tools/llvm-objcopy/ELF/keep-file-symbols.test
index 86674f1eb2d2..30e4aae225c4 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/keep-file-symbols.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/keep-file-symbols.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --strip-all --keep-file-symbols %t %t2
 # RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=STRIPALL
 # RUN: llvm-objcopy --keep-file-symbols --strip-symbol foo %t %t2

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test b/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test
index 8fecc7a146aa..120b76876854 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 
 # Tests --keep-global-symbol when used in combination with --globalize-symbol on
 # a 
diff erent symbol.

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols.test b/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols.test
index cb4d9110578b..a6ba1bee7c36 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 
 # Tests that only global symbols (via -G/--keep-global-symbols) are kept via
 # the several 
diff erent variants of -G/--keep-global-symbol(s).

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/keep-many.test b/llvm/test/tools/llvm-objcopy/ELF/keep-many.test
index 1abcb16dfca6..04649d675d41 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/keep-many.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/keep-many.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --strip-non-alloc --keep-section=.test --keep-section=.test3 %t %t2
 # RUN: llvm-objcopy --strip-non-alloc --regex --keep-section='^.test[0-9]+$' %t %t3
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/keep-only-section.test b/llvm/test/tools/llvm-objcopy/ELF/keep-only-section.test
index 75b5bbd77d43..c4c32c6c5e56 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/keep-only-section.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/keep-only-section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --keep-section=.test2 --only-section=.test %t %t2
 # RUN: llvm-objcopy -j .test --keep-section=.test2 %t %t3
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/keep-symbol-remove-section.test b/llvm/test/tools/llvm-objcopy/ELF/keep-symbol-remove-section.test
index 8b5fc9708585..ba2f70fb76e4 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/keep-symbol-remove-section.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/keep-symbol-remove-section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --remove-section .text --keep-symbol foo %t %t2
 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/keep-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/keep-symbol.test
index 70a59fe1e4b4..b91510dff27d 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/keep-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/keep-symbol.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --discard-all -K foo --keep-symbol bar %t %t2
 # RUN: llvm-objcopy -K foo -N foo -N bar --keep-symbol bar -N baz %t %t3
 # RUN: llvm-objcopy --discard-all --regex -K '^ba.*' %t %t4

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/localize-hidden.test b/llvm/test/tools/llvm-objcopy/ELF/localize-hidden.test
index fe8639f74efd..ec44063ae7ed 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/localize-hidden.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/localize-hidden.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --localize-hidden %t %t2
 # RUN: llvm-readobj --relocations --symbols %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/localize.test b/llvm/test/tools/llvm-objcopy/ELF/localize.test
index 820ce1d5b60c..8f8106eae737 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/localize.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/localize.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy \
 # RUN:     --localize-symbol Global \
 # RUN:     -L GlobalUndef \

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/no-build-id-no-notes.test b/llvm/test/tools/llvm-objcopy/ELF/no-build-id-no-notes.test
index be266fe71c52..6c3936d06c8b 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/no-build-id-no-notes.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/no-build-id-no-notes.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy --build-id-link-dir=%t-dir --build-id-link-input=.debug %t 2>&1 >/dev/null | FileCheck %s
 
 # CHECK: could not find build ID

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/no-build-id.test b/llvm/test/tools/llvm-objcopy/ELF/no-build-id.test
index a66af944d2a5..93e4a82641ed 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/no-build-id.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/no-build-id.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy --build-id-link-dir=%t-dir --build-id-link-input=.debug %t 2>&1 >/dev/null | FileCheck %s -DINPUT=%t
 
 # CHECK: error: '[[INPUT]]': could not find build ID

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/no-symbol-relocation.test b/llvm/test/tools/llvm-objcopy/ELF/no-symbol-relocation.test
index eccc48b2134f..2c6a4b7d2e05 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/no-symbol-relocation.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/no-symbol-relocation.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj --docnum=1 %s > %t1
+# RUN: yaml2obj --docnum=1 %s -o %t1
 # RUN: llvm-objcopy %t1 %t2
 # RUN: llvm-readobj --relocations %t2 | FileCheck %s
 
@@ -31,7 +31,7 @@ Sections:
 ## Check we produce a valid output when stripping unneeded symbols from an object that
 ## has a symbol table and a relocation with a symbol index of 0.
 
-# RUN: yaml2obj --docnum=2 %s > %t3
+# RUN: yaml2obj --docnum=2 %s -o %t3
 # RUN: llvm-objcopy --strip-unneeded %t3 %t4
 # RUN: llvm-readobj --relocations --sections --symbols %t4 | FileCheck %s --check-prefix=STRIP
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/null-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/null-symbol.test
index b7ac3e8cf1eb..e9e73c97aa04 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/null-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/null-symbol.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/only-section-many.test b/llvm/test/tools/llvm-objcopy/ELF/only-section-many.test
index 9f1f77d04d05..0735b693320a 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/only-section-many.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/only-section-many.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy -j .test1 -j .test2 %t %t2
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/only-section-remove-strtab.test b/llvm/test/tools/llvm-objcopy/ELF/only-section-remove-strtab.test
index c88fef2fd0cd..71aae8af088f 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/only-section-remove-strtab.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/only-section-remove-strtab.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy -R .symtab -R .strtab --only-section=.test %t %t2
 # RUN: llvm-objcopy -j .test -R .strtab -R .symtab %t %t3
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/only-section-strip-non-alloc.test b/llvm/test/tools/llvm-objcopy/ELF/only-section-strip-non-alloc.test
index ae39b51226b7..04fac204f347 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/only-section-strip-non-alloc.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/only-section-strip-non-alloc.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --strip-non-alloc --only-section=.test %t %t2
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/prefix-alloc-sections-dynrelocsec.test b/llvm/test/tools/llvm-objcopy/ELF/prefix-alloc-sections-dynrelocsec.test
index 217fe55c4463..fbdd20dd5290 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/prefix-alloc-sections-dynrelocsec.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/prefix-alloc-sections-dynrelocsec.test
@@ -1,7 +1,7 @@
 ## Check that llvm-objcopy can correctly add a prefix to
 ## a dynamic relocation section and its target section.
 
-# RUN: yaml2obj %s > %t1
+# RUN: yaml2obj %s -o %t1
 # RUN: llvm-objcopy --prefix-alloc-sections=.prefix %t1 %t2
 # RUN: llvm-readobj --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/prefix-alloc-sections.test b/llvm/test/tools/llvm-objcopy/ELF/prefix-alloc-sections.test
index 4cb9df5330f7..731c332cb268 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/prefix-alloc-sections.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/prefix-alloc-sections.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --prefix-alloc-sections=.prefix %t %t2
 # RUN: llvm-readobj --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/prefix-symbols.test b/llvm/test/tools/llvm-objcopy/ELF/prefix-symbols.test
index b359e5ea7549..7538a1c5d227 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/prefix-symbols.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/prefix-symbols.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --prefix-symbols prefix %t %t2
 # RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=COMMON --check-prefix=BASIC
 # RUN: llvm-objcopy --redefine-sym bar=baz --prefix-symbols prefix %t %t3

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/redefine-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/redefine-symbol.test
index f5927bd4bd93..83506980e933 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/redefine-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/redefine-symbol.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --redefine-sym foo=oof --redefine-sym empty= %t %t2
 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
 # RUN: echo "  bar   rab #rename bar  " > %t.rename1.txt

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/regex.test b/llvm/test/tools/llvm-objcopy/ELF/regex.test
index 9fe751fc8627..7f5683ffa92c 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/regex.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/regex.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # No symbol matches, because pattern is implicitly enveloped in '^$'
 # RUN: llvm-objcopy --discard-all --regex -K 'ba' %t %t2

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/reloc-error-remove-symtab.test b/llvm/test/tools/llvm-objcopy/ELF/reloc-error-remove-symtab.test
index 4c161de1cc65..548201802586 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/reloc-error-remove-symtab.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/reloc-error-remove-symtab.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy -R .symtab %t %t2 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR1 -DINPUT=%t
 # RUN: cp %t %t3
 # RUN: not llvm-strip --no-strip-all -R .symtab %t3 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR2 -DINPUT=%t3

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/reloc-no-symtab.test b/llvm/test/tools/llvm-objcopy/ELF/reloc-no-symtab.test
index 96bf4d3f77dc..90f47c6d227f 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/reloc-no-symtab.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/reloc-no-symtab.test
@@ -5,7 +5,7 @@
 # $ llvm-strip /tmp/a -o /tmp/b
 # llvm-strip: error: Link field value 0 in section .rela.plt is invalid.
 
-# RUN: yaml2obj %s > %t.original
+# RUN: yaml2obj %s -o %t.original
 # RUN: llvm-strip %t.original -o %t.stripped
 # RUN: llvm-readobj --sections %t.original | FileCheck %s
 # RUN: llvm-readobj --sections %t.stripped | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/relocatable-phdr.test b/llvm/test/tools/llvm-objcopy/ELF/relocatable-phdr.test
index 40216467a243..036d5a6be9ab 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/relocatable-phdr.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/relocatable-phdr.test
@@ -1,6 +1,6 @@
 # This test ensures an object without a program header will retain zero values
 # for offset and header size when copied with llvm-objcopy.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --file-headers %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/remove-multiple-sections.test b/llvm/test/tools/llvm-objcopy/ELF/remove-multiple-sections.test
index a162303ccacf..ddc4cefd2219 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/remove-multiple-sections.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/remove-multiple-sections.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy -R .test2 -R .test3 -R .test5 %t %t2
 # RUN: llvm-readobj --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/remove-section-with-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/remove-section-with-symbol.test
index 598da1684260..f1f1996ad0a9 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/remove-section-with-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/remove-section-with-symbol.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy -R .test %t %t2
 # RUN: llvm-readobj --file-headers --symbols %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/remove-section.test b/llvm/test/tools/llvm-objcopy/ELF/remove-section.test
index 927485a60020..c06b9eb44af0 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/remove-section.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/remove-section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: cp %t %t1
 
 # RUN: llvm-objcopy -R .test2 %t %t2

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/remove-shstrtab-error.test b/llvm/test/tools/llvm-objcopy/ELF/remove-shstrtab-error.test
index 797681fa036b..d2852ffb0136 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/remove-shstrtab-error.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/remove-shstrtab-error.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy -R .shstrtab %t %t2 2>&1 >/dev/null | FileCheck %s -DINPUT=%t
 
 !ELF

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/remove-symtab.test b/llvm/test/tools/llvm-objcopy/ELF/remove-symtab.test
index 5c53962b14b3..54f69e5ba010 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/remove-symtab.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/remove-symtab.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy -R .symtab %t %t2
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/rename-section-and-prefix-alloc-sections.test b/llvm/test/tools/llvm-objcopy/ELF/rename-section-and-prefix-alloc-sections.test
index fd642b6e3a46..112eb2684148 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/rename-section-and-prefix-alloc-sections.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/rename-section-and-prefix-alloc-sections.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --rename-section=.text=.text2 --rename-section=.data=.data2 --prefix-alloc-sections=.prefix %t %t2
 # RUN: llvm-readobj --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-osproc-mask.test b/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-osproc-mask.test
index ae572a6023f7..f0f3c2d86a30 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-osproc-mask.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-osproc-mask.test
@@ -2,7 +2,7 @@
 
 # ===== x86_64 =====
 
-# RUN: yaml2obj --docnum 1 %s > %t-x86_64.o
+# RUN: yaml2obj --docnum=1 %s -o %t-x86_64.o
 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-x86_64.o
 # RUN: llvm-readobj --sections %t-x86_64.o | FileCheck %s --check-prefix=X86_64
 
@@ -27,7 +27,7 @@ Sections:
 
 # ===== hex =====
 
-# RUN: yaml2obj --docnum 2 %s > %t-hex.o
+# RUN: yaml2obj --docnum=2 %s -o %t-hex.o
 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-hex.o
 # RUN: llvm-readobj --sections %t-hex.o | FileCheck %s --check-prefix=HEX
 
@@ -52,7 +52,7 @@ Sections:
 
 # ===== mips =====
 
-# RUN: yaml2obj --docnum 3 %s > %t-mips.o
+# RUN: yaml2obj --docnum=3 %s -o %t-mips.o
 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-mips.o
 # RUN: llvm-readobj --sections %t-mips.o | FileCheck %s --check-prefix=MIPS
 
@@ -88,7 +88,7 @@ Sections:
 
 # ===== arm =====
 
-# RUN: yaml2obj --docnum 4 %s > %t-arm.o
+# RUN: yaml2obj --docnum=4 %s -o %t-arm.o
 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-arm.o
 # RUN: llvm-readobj --sections %t-arm.o | FileCheck %s --check-prefix=ARM
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-preserved.test b/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-preserved.test
index e22920fe4e27..e3e0a3dac04c 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-preserved.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-preserved.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # Single flags on a section with all flags:
 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t %t.alloc

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag.test b/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag.test
index 2638a7c1fdf4..129f4c16e44b 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # Single flags on a section with no flags:
 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc  \

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/rename-section-multiple.test b/llvm/test/tools/llvm-objcopy/ELF/rename-section-multiple.test
index c508ac80c306..eac0ce013b97 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/rename-section-multiple.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/rename-section-multiple.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --rename-section=.test1=.test2 --rename-section=.test3=.test4 --rename-section=.test5=.test6 %t %t2
 # RUN: llvm-readobj --file-headers --sections --section-data %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/rename-section.test b/llvm/test/tools/llvm-objcopy/ELF/rename-section.test
index c8a1eafaa302..b2927c28b2ee 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/rename-section.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/rename-section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --rename-section=.foo=.bar %t %t2
 # RUN: llvm-readobj --file-headers --sections --section-data %t2 | FileCheck %s
 # RUN: not llvm-objcopy --rename-section=.foo.bar --rename-section=.foo=.other %t %t2 2>&1 | FileCheck %s --check-prefix=BAD-FORMAT

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/section-index-unsupported.test b/llvm/test/tools/llvm-objcopy/ELF/section-index-unsupported.test
index 6c60bf5547e3..8479d00c2485 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/section-index-unsupported.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/section-index-unsupported.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy %t %t2 2>&1 >/dev/null | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/set-section-flags-and-rename.test b/llvm/test/tools/llvm-objcopy/ELF/set-section-flags-and-rename.test
index 15ea3aeec161..4b553b3304e4 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/set-section-flags-and-rename.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/set-section-flags-and-rename.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # RUN: not llvm-objcopy --rename-section=.foo=.bar --set-section-flags=.foo=alloc %t %t.2 2>&1 | FileCheck %s --check-prefix=SET-FOO
 # RUN: not llvm-objcopy --rename-section=.foo=.bar --set-section-flags=.bar=alloc %t %t.2 2>&1 | FileCheck %s --check-prefix=SET-BAR

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/set-section-flags-multiple.test b/llvm/test/tools/llvm-objcopy/ELF/set-section-flags-multiple.test
index 41732f3807da..dd469ab512f2 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/set-section-flags-multiple.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/set-section-flags-multiple.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # RUN: llvm-objcopy --set-section-flags=.foo=alloc --set-section-flags=.bar=code %t %t.2
 # RUN: llvm-readobj --sections %t.2 | FileCheck %s --check-prefixes=CHECK,ALLOC,WRITE

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/set-section-flags.test b/llvm/test/tools/llvm-objcopy/ELF/set-section-flags.test
index 54e3736e49be..db063fd96e59 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/set-section-flags.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/set-section-flags.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # Single flags on a section with no flags:
 # RUN: llvm-objcopy --set-section-flags=.foo=alloc \

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/shstrtab-optimize.test b/llvm/test/tools/llvm-objcopy/ELF/shstrtab-optimize.test
index 8b1da2141aa5..19c1b674a36b 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/shstrtab-optimize.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/shstrtab-optimize.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-keep-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-keep-symbol.test
index 8ff1aa4a5e32..10228e6219b7 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-keep-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-keep-symbol.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: cp %t %t1
 # RUN: llvm-objcopy --strip-all --keep-symbol foo %t %t2
 # RUN: llvm-readobj --sections --symbols %t2 | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-remove.test b/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-remove.test
index 15a6f4f7ccaf..e190a7eab2a3 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-remove.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-remove.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: cp %t %t1
 
 # RUN: llvm-strip --remove-section=.text.bar %t

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-all-gnu.test b/llvm/test/tools/llvm-objcopy/ELF/strip-all-gnu.test
index 727a91b612db..7df3d3b3c91a 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-all-gnu.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-all-gnu.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --strip-all-gnu %t %t2
 # RUN: llvm-strip --strip-all-gnu %t -o %t3
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-all.test b/llvm/test/tools/llvm-objcopy/ELF/strip-all.test
index dabb9ef6a91a..cba3f1490184 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-all.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-all.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: cp %t %t3
 # RUN: llvm-objcopy --strip-all %t %t2
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test b/llvm/test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test
index da7659294b79..ed782a1fad5c 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: cp %t %t1
 
 # RUN: llvm-strip --strip-debug --remove-section=.text.bar %t

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-debug.test b/llvm/test/tools/llvm-objcopy/ELF/strip-debug.test
index c4440bf7eca6..711f9d3b6d89 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-debug.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-debug.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: cp %t %t3
 # RUN: llvm-objcopy --strip-debug %t %t2
 # RUN: llvm-readobj --file-headers --sections --symbols %t2 | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-group-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/strip-group-symbol.test
index acca56c7cef3..65658999f7ac 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-group-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-group-symbol.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy -N foo %t %t2 2>&1 | FileCheck %s
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-multiple-files.test b/llvm/test/tools/llvm-objcopy/ELF/strip-multiple-files.test
index b22974afd4d5..a6af9496ebac 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-multiple-files.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-multiple-files.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 
 # Run llvm-strip normally. This will create a stripped object file for later
 # tests so we only have to run FileCheck on it once.

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-non-alloc.test b/llvm/test/tools/llvm-objcopy/ELF/strip-non-alloc.test
index 1f082bf47344..cf6561d0891a 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-non-alloc.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-non-alloc.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --strip-non-alloc %t %t2
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-arm-attributes.test b/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-arm-attributes.test
index 2dcca66df1a6..0434ff137cdf 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-arm-attributes.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-arm-attributes.test
@@ -2,7 +2,7 @@
 ## .ARM.attributes sections in ELF files. This is needed to maintain
 ## compatibility for Ubuntu/Debian distributions on ARM.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --strip-all %t %t2
 # RUN: llvm-readobj --sections %t2 | FileCheck %s
 # RUN: llvm-objcopy --strip-all-gnu %t %t3

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test b/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
index aad537cf48eb..f23ece4d4455 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
@@ -3,7 +3,7 @@
 # UNSUPPORTED: system-netbsd
 
 # Preserve dates when stripping to an output file.
-# RUN: yaml2obj %s > %t.1.o
+# RUN: yaml2obj %s -o %t.1.o
 # RUN: touch -a -t 199505050555.55 %t.1.o
 # RUN: llvm-strip -p %t.1.o -o %t-preserved.1.o
 # RUN: ls -lu %t-preserved.1.o | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME
@@ -11,28 +11,28 @@
 # RUN: llvm-readobj %t-preserved.1.o
 
 # Preserve dates available via objcopy interface as well.
-# RUN: yaml2obj %s > %t.2.o
+# RUN: yaml2obj %s -o %t.2.o
 # RUN: touch -a -t 199505050555.55 %t.2.o
 # RUN: llvm-objcopy -p %t.2.o %t-preserved.2.o
 # RUN: ls -lu %t-preserved.2.o | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME
 # RUN: llvm-readobj %t-preserved.2.o
 
 # Preserve dates when stripping in place.
-# RUN: yaml2obj %s > %t.3.o
+# RUN: yaml2obj %s -o %t.3.o
 # RUN: touch -a -t 199505050555.55 %t.3.o
 # RUN: llvm-strip -p %t.3.o
 # RUN: ls -lu %t.3.o | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME
 # RUN: llvm-readobj %t.3.o
 
 # Without -p set, don't preserve dates.
-# RUN: yaml2obj %s > %t.4.o
+# RUN: yaml2obj %s -o %t.4.o
 # RUN: touch -a -t 199505050555.55 %t.4.o
 # RUN: llvm-strip %t.4.o
 # RUN: ls -lu %t.4.o | FileCheck %s --check-prefix=CHECK-NO-PRESERVE-ATIME
 # RUN: llvm-readobj %t.4.o
 
 # Preserve dates in archives.
-# RUN: yaml2obj %s > %t.5.o
+# RUN: yaml2obj %s -o %t.5.o
 # RUN: rm -f %t.a
 # RUN: llvm-ar cr %t.a %t.5.o
 # RUN: touch -a -t 199505050555.55 %t.a

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-mtime.test b/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-mtime.test
index 5f247aefdbf8..aa1c37a1428f 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-mtime.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-mtime.test
@@ -1,7 +1,7 @@
 # Note: ls -l prints the modified timestamp
 
 # Preserve dates when stripping to an output file.
-# RUN: yaml2obj %s > %t.1.o
+# RUN: yaml2obj %s -o %t.1.o
 # RUN: touch -m -t 199705050555.55 %t.1.o
 # RUN: llvm-strip -p %t.1.o -o %t-preserved.1.o
 # RUN: ls -l %t-preserved.1.o | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME
@@ -9,28 +9,28 @@
 # RUN: llvm-readobj %t-preserved.1.o
 
 # Preserve dates available via objcopy interface as well.
-# RUN: yaml2obj %s > %t.2.o
+# RUN: yaml2obj %s -o %t.2.o
 # RUN: touch -m -t 199705050555.55 %t.2.o
 # RUN: llvm-objcopy -p %t.2.o %t-preserved.2.o
 # RUN: ls -l %t-preserved.2.o | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME
 # RUN: llvm-readobj %t-preserved.2.o
 
 # Preserve dates when stripping in place.
-# RUN: yaml2obj %s > %t.3.o
+# RUN: yaml2obj %s -o %t.3.o
 # RUN: touch -m -t 199705050555.55 %t.3.o
 # RUN: llvm-strip -p %t.3.o
 # RUN: ls -l %t.3.o | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME
 # RUN: llvm-readobj %t.3.o
 
 # Without -p set, don't preserve dates.
-# RUN: yaml2obj %s > %t.4.o
+# RUN: yaml2obj %s -o %t.4.o
 # RUN: touch -m -t 199705050555.55 %t.4.o
 # RUN: llvm-strip %t.4.o
 # RUN: ls -l %t.4.o | FileCheck %s --check-prefix=CHECK-NO-PRESERVE-MTIME
 # RUN: llvm-readobj %t.4.o
 
 # Preserve dates in archives.
-# RUN: yaml2obj %s > %t.5.o
+# RUN: yaml2obj %s -o %t.5.o
 # RUN: rm -f %t.a
 # RUN: llvm-ar cr %t.a %t.5.o
 # RUN: touch -m -t 199705050555.55 %t.a

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-reloc-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/strip-reloc-symbol.test
index 99b5d51c0e88..63c9e122d9a2 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-reloc-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-reloc-symbol.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy -N foo %t %t2 2>&1 | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-section-err.test b/llvm/test/tools/llvm-objcopy/ELF/strip-section-err.test
index 8f0a809b7f87..7f53cf65bdf9 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-section-err.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-section-err.test
@@ -1,14 +1,14 @@
 ## Check we cannot remove a section containing symbols
 ## referenced by relocations contained in the object.
 
-# RUN: yaml2obj %s > %t1
+# RUN: yaml2obj %s -o %t1
 # RUN: not llvm-objcopy -R .data %t1 2>&1 | FileCheck %s -DINPUT=%t1
 # CHECK: error: '[[INPUT]]': section '.data' cannot be removed: (.text+0x1) has relocation against symbol 'foo'
 
 ## Check the behavior when we also remove the relocation section.
 ## We have no reference in this case and hence no error should be emitted.
 
-# RUN: yaml2obj %s > %t2
+# RUN: yaml2obj %s -o %t2
 # RUN: llvm-objcopy -R .data -R .rela.text %t2 %t3
 # RUN: llvm-objdump --section-headers %t3 | FileCheck %s --check-prefix=NOSEC
 # NOSEC-NOT: .data

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-sections-keep.test b/llvm/test/tools/llvm-objcopy/ELF/strip-sections-keep.test
index 711687f9253b..ebf32006b4a2 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-sections-keep.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-sections-keep.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --strip-sections --keep-section=.shstrtab %t %t2
 # RUN: od -Ax -t c %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-sections-only-section.test b/llvm/test/tools/llvm-objcopy/ELF/strip-sections-only-section.test
index e2236a9fdd96..054a3969fd28 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-sections-only-section.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-sections-only-section.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --strip-sections --only-section=.test %t %t2
 # RUN: od -Ax -t x1 %t2 | FileCheck %s
 # RUN: od -Ax -t c  %t2 | FileCheck %s --check-prefix=TEXT

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-sections.test b/llvm/test/tools/llvm-objcopy/ELF/strip-sections.test
index d17dc33c5bc1..68bc07fcde06 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-sections.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-sections.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --strip-sections %t %t2
 # RUN: llvm-readobj --file-headers --program-headers %t2 | FileCheck %s
 # RUN: od -t x1 -j 4096 -N 12 %t2 | FileCheck %s --ignore-case --check-prefix=DATA

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-symbol-and-relocation.test b/llvm/test/tools/llvm-objcopy/ELF/strip-symbol-and-relocation.test
index 76833c04713a..d1147feb9c29 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-symbol-and-relocation.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-symbol-and-relocation.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 ## Check we are able to strip all symbols and relocatable information at the same time.
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/strip-symbol.test
index e63aaae40285..78de46cc47b5 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-symbol.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --strip-symbol baz -N bar %t %t2
 # RUN: llvm-readobj --symbols --sections %t2 | FileCheck %s
 # RUN: llvm-strip --strip-symbol baz -N bar %t -o %t3

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-all-symbols.test b/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-all-symbols.test
index e2fd42021158..c66a52353158 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-all-symbols.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-all-symbols.test
@@ -2,7 +2,7 @@
 ## eliminate the static symbol table, because it's not used
 ## by the dynamic loader. 
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: cp %t %t1
 # RUN: llvm-objcopy --strip-unneeded %t %t2
 # RUN: llvm-readobj --section-headers %t2 | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-remove-debug-keep-link.test b/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-remove-debug-keep-link.test
index 948bfea2d9c5..6bc5300d2081 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-remove-debug-keep-link.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-remove-debug-keep-link.test
@@ -1,7 +1,7 @@
 ## Verifies that running with --strip-unneeded removes debugging sections but
 ## retains the .gnu_debuglink section.
 
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: touch %t.debug
 # RUN: llvm-objcopy --add-gnu-debuglink=%t.debug %t.o %t.2.o
 # RUN: llvm-strip --strip-unneeded %t.2.o -o %t.3.o

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded.test b/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded.test
index 98d031cd2c77..0556a4f127e0 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: cp %t %t1
 # RUN: llvm-objcopy --strip-unneeded %t %t2
 # Verify that llvm-objcopy has not modified the input.

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strtab-optimize.test b/llvm/test/tools/llvm-objcopy/ELF/strtab-optimize.test
index 41f86814a803..10b17a622a05 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strtab-optimize.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strtab-optimize.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2 --add-symbol='foo=1' --add-symbol='foofoo=2'
 # RUN: llvm-readobj --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/symbol-copy.test b/llvm/test/tools/llvm-objcopy/ELF/symbol-copy.test
index 9e70a81ed858..a71ccfd7e858 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/symbol-copy.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/symbol-copy.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/symbol-empty-name.test b/llvm/test/tools/llvm-objcopy/ELF/symbol-empty-name.test
index f2a5b1ac2ce6..84f6ff75a922 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/symbol-empty-name.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/symbol-empty-name.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/symtab-error-on-remove-strtab.test b/llvm/test/tools/llvm-objcopy/ELF/symtab-error-on-remove-strtab.test
index 4aac930e4698..d74a755d257e 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/symtab-error-on-remove-strtab.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/symtab-error-on-remove-strtab.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: not llvm-objcopy -R .strtab %t %t2 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR1 -DINPUT=%t
 # RUN: cp %t %t3
 # RUN: not llvm-strip --no-strip-all -R .strtab %t3 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR2 -DINPUT=%t3

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/symtab-link.test b/llvm/test/tools/llvm-objcopy/ELF/symtab-link.test
index 8297529cb652..701e4a397456 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/symtab-link.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/symtab-link.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --sections %t2 | FileCheck %s
 # RUN: cp %t %t3

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/weaken-all.test b/llvm/test/tools/llvm-objcopy/ELF/weaken-all.test
index ab83c6565627..6fd8b64715f9 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/weaken-all.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/weaken-all.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --weaken %t %t2
 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/weaken.test b/llvm/test/tools/llvm-objcopy/ELF/weaken.test
index 09f2476e0b26..3c4a71136069 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/weaken.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/weaken.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy --weaken-symbol Global -W Local -W Weak %t %t2
 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
 # RUN: llvm-objcopy --regex --weaken-symbol='.*' %t %t3

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/wildcard-flags.test b/llvm/test/tools/llvm-objcopy/ELF/wildcard-flags.test
index 29a91cd1dc63..49f183858822 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/wildcard-flags.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/wildcard-flags.test
@@ -3,7 +3,7 @@
 ## are configured correctly.
 ## For more detailed syntax tests, see wildcard-syntax.test.
 
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 
 ## Check that --regex and --wildcard cannot be used together.
 # RUN: not llvm-objcopy --regex --wildcard %t.o %t.err.o 2>&1 \

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/wildcard-syntax.test b/llvm/test/tools/llvm-objcopy/ELF/wildcard-syntax.test
index 685ba1607048..67f7f0b273c9 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/wildcard-syntax.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/wildcard-syntax.test
@@ -1,7 +1,7 @@
 ## This test checks that llvm-objcopy accepts glob (or "shell wildcard") syntax
 ## for the --wildcard (-w) flag correctly.
 
-# RUN: yaml2obj --docnum=1 %s > %t.o
+# RUN: yaml2obj --docnum=1 %s -o %t.o
 
 ## * matches all characters.
 # RUN: llvm-objcopy --remove-section='.f*' %t.o %t.glob.o
@@ -61,7 +61,7 @@ Symbols: []
 
 ## Use a separate test file with special characters for the following tests.
 
-# RUN: yaml2obj --docnum=2 %s > %t.special.o
+# RUN: yaml2obj --docnum=2 %s -o %t.special.o
 
 ## \ escapes wildcard characters.
 # RUN: llvm-objcopy --remove-section='\*' %t.special.o %t.escape.1.o

diff  --git a/llvm/test/tools/llvm-objcopy/MachO/basic-big-endian-32-copy.test b/llvm/test/tools/llvm-objcopy/MachO/basic-big-endian-32-copy.test
index 692fb50f0581..083011badc3b 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/basic-big-endian-32-copy.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/basic-big-endian-32-copy.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: cmp %t %t2
 

diff  --git a/llvm/test/tools/llvm-objcopy/MachO/basic-big-endian-64-copy.test b/llvm/test/tools/llvm-objcopy/MachO/basic-big-endian-64-copy.test
index 5294f4e5be13..ff8e4a0096bb 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/basic-big-endian-64-copy.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/basic-big-endian-64-copy.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: cmp %t %t2
 

diff  --git a/llvm/test/tools/llvm-objcopy/MachO/basic-executable-copy.test b/llvm/test/tools/llvm-objcopy/MachO/basic-executable-copy.test
index 85eebad28709..ce176b683024 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/basic-executable-copy.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/basic-executable-copy.test
@@ -2,7 +2,7 @@
 ## uses llvm-readobj instead of cmp because some parts of the object
 ## (e.g., the string table) are not identical; the output file is correct but
 ## some offsets 
diff er from the input file.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/MachO/basic-little-endian-32-copy.test b/llvm/test/tools/llvm-objcopy/MachO/basic-little-endian-32-copy.test
index c43aed7004ba..7e6663945179 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/basic-little-endian-32-copy.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/basic-little-endian-32-copy.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: cmp %t %t2
 

diff  --git a/llvm/test/tools/llvm-objcopy/MachO/basic-little-endian-64-copy.test b/llvm/test/tools/llvm-objcopy/MachO/basic-little-endian-64-copy.test
index b395020b4bc4..18e3bbb997ea 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/basic-little-endian-64-copy.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/basic-little-endian-64-copy.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objcopy %t %t2
 # RUN: cmp %t %t2
 

diff  --git a/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-add-rpath.test b/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-add-rpath.test
index 6d262019429a..61aca209315a 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-add-rpath.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-add-rpath.test
@@ -1,10 +1,10 @@
 ## This test checks adding a new LC_RPATH load command to a MachO binary.
 
-# RUN: yaml2obj %p/Inputs/i386.yaml > %t.i386
+# RUN: yaml2obj %p/Inputs/i386.yaml -o %t.i386
 # RUN: llvm-install-name-tool -add_rpath @executable_path/. %t.i386
 # RUN: llvm-objdump -p %t.i386 | FileCheck --check-prefix=NEW-RPATH %s
 
-# RUN: yaml2obj %p/Inputs/x86_64.yaml > %t.x86_64
+# RUN: yaml2obj %p/Inputs/x86_64.yaml -o %t.x86_64
 # RUN: llvm-install-name-tool -add_rpath @executable_path/. %t.x86_64
 # RUN: llvm-objdump -p %t.x86_64 | FileCheck --check-prefix=NEW-RPATH %s
 

diff  --git a/llvm/test/tools/llvm-objcopy/MachO/min-version-load-commands.test b/llvm/test/tools/llvm-objcopy/MachO/min-version-load-commands.test
index 42dce2e192c1..504ea1e0d155 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/min-version-load-commands.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/min-version-load-commands.test
@@ -3,18 +3,18 @@
 ## load command of this type (LC_VERSION_MIN_IPHONEOS, LC_VERSION_MIN_MACOSX,
 ## LC_VERSION_MIN_TVOS, LC_VERSION_MIN_WATCHOS).
 
-# RUN: yaml2obj %p/Inputs/min_iphoneos_version_lc.yaml > %t.iphoneos
+# RUN: yaml2obj %p/Inputs/min_iphoneos_version_lc.yaml -o %t.iphoneos
 # RUN: llvm-objcopy %t.iphoneos %t.iphoneos.copy
 # RUN: cmp %t.iphoneos %t.iphoneos.copy
 
-# RUN: yaml2obj %p/Inputs/min_macos_version_lc.yaml > %t.macos
+# RUN: yaml2obj %p/Inputs/min_macos_version_lc.yaml -o %t.macos
 # RUN: llvm-objcopy %t.macos %t.macos.copy
 # RUN: cmp %t.macos %t.macos.copy
 
-# RUN: yaml2obj %p/Inputs/min_tvos_version_lc.yaml > %t.tvos
+# RUN: yaml2obj %p/Inputs/min_tvos_version_lc.yaml -o %t.tvos
 # RUN: llvm-objcopy %t.tvos %t.tvos.copy
 # RUN: cmp %t.tvos %t.tvos.copy
 
-# RUN: yaml2obj %p/Inputs/min_watchos_version_lc.yaml > %t.watchos
+# RUN: yaml2obj %p/Inputs/min_watchos_version_lc.yaml -o %t.watchos
 # RUN: llvm-objcopy %t.watchos %t.watchos.copy
 # RUN: cmp %t.watchos %t.watchos.copy

diff  --git a/llvm/test/tools/llvm-objcopy/MachO/only-section.test b/llvm/test/tools/llvm-objcopy/MachO/only-section.test
index 4e26031d2e53..2caab80d0492 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/only-section.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/only-section.test
@@ -1,7 +1,7 @@
 ## Show that if --only-section is given, llvm-objcopy removes all sections
 ## except ones specified in the option.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 ## Specify all sections. The output file should be the same as the input.
 # RUN: llvm-objcopy -j __TEXT,__text -j __DATA,__data -j __TEXT,__const %t %t2

diff  --git a/llvm/test/tools/llvm-objcopy/MachO/remove-section.test b/llvm/test/tools/llvm-objcopy/MachO/remove-section.test
index beb4dd8ba5a3..a9f279c9490f 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/remove-section.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/remove-section.test
@@ -1,7 +1,7 @@
 ## Show that if --remove-section is given, llvm-objcopy removes sections
 ## specified by the option.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 ## Remove only __TEXT,__text section.
 # RUN: llvm-objcopy --remove-section __TEXT,__text %t %t2

diff  --git a/llvm/test/tools/llvm-objcopy/MachO/strip-all.test b/llvm/test/tools/llvm-objcopy/MachO/strip-all.test
index 1a69234ac1bb..fe2bc979425a 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/strip-all.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/strip-all.test
@@ -1,7 +1,7 @@
 ## Show that llvm-objcopy/llvm-strip removes all symbols and debug sections.
 
-# RUN: yaml2obj %p/Inputs/strip-all.yaml > %t.exec
-# RUN: yaml2obj %p/Inputs/strip-all-with-dwarf.yaml > %t.dwarf
+# RUN: yaml2obj %p/Inputs/strip-all.yaml -o %t.exec
+# RUN: yaml2obj %p/Inputs/strip-all-with-dwarf.yaml -o %t.dwarf
 
 ## Check that the symbol list satisfies the order: local / defined external /
 ## undefined external, otherwise llvm-objcopy will fail.

diff  --git a/llvm/test/tools/llvm-objcopy/redefine-symbols.test b/llvm/test/tools/llvm-objcopy/redefine-symbols.test
index 837294d3efe0..8f6cba0c8243 100644
--- a/llvm/test/tools/llvm-objcopy/redefine-symbols.test
+++ b/llvm/test/tools/llvm-objcopy/redefine-symbols.test
@@ -1,6 +1,6 @@
 ## Test common parsing errors general to all supported binary formats.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # RUN: not llvm-objcopy --redefine-sym bar %t /dev/null 2>&1 | FileCheck %s --check-prefix=BAD-FORMAT
 # BAD-FORMAT: bad format for --redefine-sym

diff  --git a/llvm/test/tools/llvm-objdump/X86/adjust-vma.test b/llvm/test/tools/llvm-objdump/X86/adjust-vma.test
index 61eadaffa7e0..00eaffa50af4 100644
--- a/llvm/test/tools/llvm-objdump/X86/adjust-vma.test
+++ b/llvm/test/tools/llvm-objdump/X86/adjust-vma.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objdump --all-headers -D -z %t | FileCheck %s --check-prefixes=COMMON,NOADJUST
 # RUN: llvm-objdump --all-headers -D -z --adjust-vma=0x0 %t | FileCheck %s --check-prefixes=COMMON,NOADJUST
 # RUN: llvm-objdump --all-headers -D -z --adjust-vma=0x123000 %t | FileCheck %s --check-prefixes=COMMON,ADJUST

diff  --git a/llvm/test/tools/llvm-objdump/X86/disassemble-demangle.test b/llvm/test/tools/llvm-objdump/X86/disassemble-demangle.test
index 74f2b94075ed..913e0e64203c 100644
--- a/llvm/test/tools/llvm-objdump/X86/disassemble-demangle.test
+++ b/llvm/test/tools/llvm-objdump/X86/disassemble-demangle.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objdump -d -C %t | FileCheck --check-prefix=DEMANGLE %s
 # RUN: llvm-objdump -d --demangle %t | FileCheck --check-prefix=DEMANGLE %s
 # RUN: llvm-objdump -d %t | FileCheck --check-prefix=NO-DEMANGLE %s

diff  --git a/llvm/test/tools/llvm-objdump/X86/disassemble-zeroes-relocations.test b/llvm/test/tools/llvm-objdump/X86/disassemble-zeroes-relocations.test
index ee8acb9edd4f..b1504f054834 100644
--- a/llvm/test/tools/llvm-objdump/X86/disassemble-zeroes-relocations.test
+++ b/llvm/test/tools/llvm-objdump/X86/disassemble-zeroes-relocations.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 ## Check we do not skip zeroes blocks if have relocations pointed to these places.
 # RUN: llvm-objdump -D --reloc %t

diff  --git a/llvm/test/tools/llvm-objdump/X86/elf-disassemble-bss.test b/llvm/test/tools/llvm-objdump/X86/elf-disassemble-bss.test
index 01d3a49c9b51..b5ff9e232c91 100644
--- a/llvm/test/tools/llvm-objdump/X86/elf-disassemble-bss.test
+++ b/llvm/test/tools/llvm-objdump/X86/elf-disassemble-bss.test
@@ -1,7 +1,7 @@
 ## Check that when BSS is larger than the file llvm-objdump doesn't
 ## assert with an unexpected end of file error.
-# RUN: yaml2obj --docnum=1 %s > %t
-# RUN: yaml2obj --docnum=2 %s > %t.2
+# RUN: yaml2obj --docnum=1 %s -o %t
+# RUN: yaml2obj --docnum=2 %s -o %t.2
 # RUN: llvm-objdump -D %t | FileCheck %s
 # RUN: llvm-objdump -D %t.2 | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objdump/X86/elf-disassemble-relocs.test b/llvm/test/tools/llvm-objdump/X86/elf-disassemble-relocs.test
index 74d374f0884d..a690328085e4 100644
--- a/llvm/test/tools/llvm-objdump/X86/elf-disassemble-relocs.test
+++ b/llvm/test/tools/llvm-objdump/X86/elf-disassemble-relocs.test
@@ -63,7 +63,7 @@ Sections:
   Relocations: []
 
 ## Check ranges of addends being displayed in a dump of relocations mixed with disassembly.
-# RUN: yaml2obj --docnum=3 %s > %t3
+# RUN: yaml2obj --docnum=3 %s -o %t3
 # RUN: llvm-objdump -d -r %t3 | FileCheck %s --check-prefix=ADDENDS
 
 # ADDENDS: Disassembly of section .text:

diff  --git a/llvm/test/tools/llvm-objdump/X86/output-ordering.test b/llvm/test/tools/llvm-objdump/X86/output-ordering.test
index 0d629af91e00..6fe1a00512ed 100644
--- a/llvm/test/tools/llvm-objdump/X86/output-ordering.test
+++ b/llvm/test/tools/llvm-objdump/X86/output-ordering.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-objdump --file-headers --private-headers --section-headers --syms \
 # RUN:   --full-contents --dwarf=frames \
 # RUN:   --reloc %t.o | FileCheck %s --check-prefixes=CHECK,RELOC

diff  --git a/llvm/test/tools/llvm-objdump/X86/phdrs-lma.test b/llvm/test/tools/llvm-objdump/X86/phdrs-lma.test
index de1b982c0de7..c83373a3014a 100644
--- a/llvm/test/tools/llvm-objdump/X86/phdrs-lma.test
+++ b/llvm/test/tools/llvm-objdump/X86/phdrs-lma.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 ## Check we print both VMA and LMA correctly when dumping section headers.
 # RUN: llvm-objdump --section-headers %t | FileCheck %s

diff  --git a/llvm/test/tools/llvm-objdump/X86/phdrs-lma2.test b/llvm/test/tools/llvm-objdump/X86/phdrs-lma2.test
index 2dd155f246ca..ead250e8cf39 100644
--- a/llvm/test/tools/llvm-objdump/X86/phdrs-lma2.test
+++ b/llvm/test/tools/llvm-objdump/X86/phdrs-lma2.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 ## If there are no sections with 
diff erent LMA to VMA,
 ## we do not display LMA column.

diff  --git a/llvm/test/tools/llvm-objdump/elf-dynamic-section.test b/llvm/test/tools/llvm-objdump/elf-dynamic-section.test
index 8688f0db1e31..0a99145d977a 100644
--- a/llvm/test/tools/llvm-objdump/elf-dynamic-section.test
+++ b/llvm/test/tools/llvm-objdump/elf-dynamic-section.test
@@ -215,7 +215,7 @@ ProgramHeaders:
     Sections:
       - Section: .dynamic
 
-# RUN: yaml2obj --docnum=2 %s > %t2
+# RUN: yaml2obj --docnum=2 %s -o %t2
 # RUN: llvm-objdump -p %t2 | FileCheck %s --strict-whitespace --match-full-lines --check-prefix=ELF32
 
 #      ELF32:Dynamic Section:

diff  --git a/llvm/test/tools/llvm-objdump/file-headers-coff.test b/llvm/test/tools/llvm-objdump/file-headers-coff.test
index 64ddda68ba46..26c25f95a9cf 100644
--- a/llvm/test/tools/llvm-objdump/file-headers-coff.test
+++ b/llvm/test/tools/llvm-objdump/file-headers-coff.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objdump -f %t | FileCheck %s -DFILE=%t
 # RUN: llvm-objdump -file-headers %t | FileCheck %s -DFILE=%t
 

diff  --git a/llvm/test/tools/llvm-objdump/file-headers-elf.test b/llvm/test/tools/llvm-objdump/file-headers-elf.test
index 4b4549893b45..da90468e9a28 100644
--- a/llvm/test/tools/llvm-objdump/file-headers-elf.test
+++ b/llvm/test/tools/llvm-objdump/file-headers-elf.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj --docnum=1 %s > %t
+# RUN: yaml2obj --docnum=1 %s -o %t
 # RUN: llvm-objdump -f %t | FileCheck %s -DFILE=%t -check-prefix ELF64
 # RUN: llvm-objdump -file-headers %t | FileCheck %s -DFILE=%t -check-prefix ELF64
 
@@ -14,7 +14,7 @@ FileHeader:
 # ELF64: architecture: x86_64
 # ELF64: start address: 0x00123456789abcde
 
-# RUN: yaml2obj --docnum=2 %s > %t-i386
+# RUN: yaml2obj --docnum=2 %s -o %t-i386
 # RUN: llvm-objdump -f %t-i386 | FileCheck -DFILE=%t-i386 %s -check-prefix ELF32
 # RUN: llvm-objdump -file-headers %t-i386 | FileCheck %s -DFILE=%t-i386 -check-prefix ELF32
 

diff  --git a/llvm/test/tools/llvm-objdump/file-headers-pe.test b/llvm/test/tools/llvm-objdump/file-headers-pe.test
index 68c086163bb0..b0146226d68a 100644
--- a/llvm/test/tools/llvm-objdump/file-headers-pe.test
+++ b/llvm/test/tools/llvm-objdump/file-headers-pe.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objdump -f %t | FileCheck %s
 # RUN: llvm-objdump -file-headers %t | FileCheck %s
 

diff  --git a/llvm/test/tools/llvm-objdump/full-contents.test b/llvm/test/tools/llvm-objdump/full-contents.test
index 29cc9fdb800c..1ebe4000f8c0 100644
--- a/llvm/test/tools/llvm-objdump/full-contents.test
+++ b/llvm/test/tools/llvm-objdump/full-contents.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objdump --full-contents %t > %t.out1
 # RUN: llvm-objdump -s %t > %t.out2
 # RUN: cmp %t.out1 %t.out2

diff  --git a/llvm/test/tools/llvm-objdump/macho-bad-dysymtab.test b/llvm/test/tools/llvm-objdump/macho-bad-dysymtab.test
index 6f8cee766cf6..f5fe4e34096f 100644
--- a/llvm/test/tools/llvm-objdump/macho-bad-dysymtab.test
+++ b/llvm/test/tools/llvm-objdump/macho-bad-dysymtab.test
@@ -1,4 +1,4 @@
-#RUN: yaml2obj %s > %t1.dylib
+#RUN: yaml2obj %s -o %t1.dylib
 #RUN: not llvm-objdump -d %t1.dylib 2>&1 | FileCheck %s
 
 --- !mach-o

diff  --git a/llvm/test/tools/llvm-objdump/non-archive-object.test b/llvm/test/tools/llvm-objdump/non-archive-object.test
index b1884102c02e..0064f7de9f9f 100644
--- a/llvm/test/tools/llvm-objdump/non-archive-object.test
+++ b/llvm/test/tools/llvm-objdump/non-archive-object.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objdump -a %t | FileCheck %s
 
 # If this test has not crashed, then this test passed.

diff  --git a/llvm/test/tools/llvm-objdump/private-headers-no-dynamic-segment.test b/llvm/test/tools/llvm-objdump/private-headers-no-dynamic-segment.test
index c3f592532b7e..703db6551db2 100644
--- a/llvm/test/tools/llvm-objdump/private-headers-no-dynamic-segment.test
+++ b/llvm/test/tools/llvm-objdump/private-headers-no-dynamic-segment.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objdump -p %t | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-objdump/private-headers-no-dynamic.test b/llvm/test/tools/llvm-objdump/private-headers-no-dynamic.test
index 80c684183384..d7ae6c290cad 100644
--- a/llvm/test/tools/llvm-objdump/private-headers-no-dynamic.test
+++ b/llvm/test/tools/llvm-objdump/private-headers-no-dynamic.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objdump -p %t | FileCheck %s
 
 !ELF

diff  --git a/llvm/test/tools/llvm-objdump/relocations-elf.test b/llvm/test/tools/llvm-objdump/relocations-elf.test
index becbc35d81a8..51e539c76f0a 100644
--- a/llvm/test/tools/llvm-objdump/relocations-elf.test
+++ b/llvm/test/tools/llvm-objdump/relocations-elf.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj --docnum=1 %s > %t
+# RUN: yaml2obj --docnum=1 %s -o %t
 # RUN: llvm-objdump --reloc %t > %t1
 # RUN: llvm-objdump -r      %t > %t2
 # RUN: cmp %t1 %t2
@@ -73,7 +73,7 @@ Symbols:
 
 ## Check we report an error if the relocated section identified by the
 ## sh_info field of a relocation section is invalid.
-# RUN: yaml2obj --docnum=2 %s > %t2
+# RUN: yaml2obj --docnum=2 %s -o %t2
 # RUN: not llvm-objdump --reloc %t2 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=ERR
 # ERR: error: '[[FILE]]': section (1): unable to get a relocation target: invalid section index: 255
 
@@ -92,7 +92,7 @@ Sections:
       Type: R_X86_64_NONE
 
 ## Check ranges of addends being displayed in a dump of relocations.
-# RUN: yaml2obj --docnum=3 %s > %t3
+# RUN: yaml2obj --docnum=3 %s -o %t3
 # RUN: llvm-objdump -r %t3 | FileCheck %s --check-prefix=ADDENDS
 
 # ADDENDS: RELOCATION RECORDS FOR [.text]:

diff  --git a/llvm/test/tools/llvm-objdump/symbol-table-elf.test b/llvm/test/tools/llvm-objdump/symbol-table-elf.test
index a2a7f018618c..ab35a7d8a267 100644
--- a/llvm/test/tools/llvm-objdump/symbol-table-elf.test
+++ b/llvm/test/tools/llvm-objdump/symbol-table-elf.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objdump --syms %t > %t1
 # RUN: llvm-objdump -t     %t > %t2
 # RUN: cmp %t1 %t2

diff  --git a/llvm/test/tools/llvm-objdump/verdef-elf.test b/llvm/test/tools/llvm-objdump/verdef-elf.test
index 3103bd527dd2..254328f877c5 100644
--- a/llvm/test/tools/llvm-objdump/verdef-elf.test
+++ b/llvm/test/tools/llvm-objdump/verdef-elf.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objdump -p %t | FileCheck --strict-whitespace %s
 
 # CHECK:      Version definitions:

diff  --git a/llvm/test/tools/llvm-objdump/verneed-elf.test b/llvm/test/tools/llvm-objdump/verneed-elf.test
index 799d2b2ed746..b9130dcbb11c 100644
--- a/llvm/test/tools/llvm-objdump/verneed-elf.test
+++ b/llvm/test/tools/llvm-objdump/verneed-elf.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objdump -p %t | FileCheck %s
 
 # CHECK:      Version References:

diff  --git a/llvm/test/tools/llvm-objdump/verneed-wrong-info.test b/llvm/test/tools/llvm-objdump/verneed-wrong-info.test
index 9811564a16dc..cf1c18e81596 100644
--- a/llvm/test/tools/llvm-objdump/verneed-wrong-info.test
+++ b/llvm/test/tools/llvm-objdump/verneed-wrong-info.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-objdump -p %t 2>&1 | FileCheck %s
 
 # We have a SHT_GNU_verneed section with a broken sh_info field

diff  --git a/llvm/test/tools/llvm-objdump/warn-on-out-of-range-start-stop-address.test b/llvm/test/tools/llvm-objdump/warn-on-out-of-range-start-stop-address.test
index 29912aee095e..797a48b20ca3 100644
--- a/llvm/test/tools/llvm-objdump/warn-on-out-of-range-start-stop-address.test
+++ b/llvm/test/tools/llvm-objdump/warn-on-out-of-range-start-stop-address.test
@@ -2,10 +2,10 @@
 ## do not intersect with address ranges of sections that have the SHF_ALLOC
 ## flag.
 
-# RUN: yaml2obj --docnum=1 %s > %t
-# RUN: yaml2obj --docnum=2 %s > %t.2
-# RUN: yaml2obj --docnum=3 %s > %t.o
-# RUN: yaml2obj --docnum=4 %s > %t.3
+# RUN: yaml2obj --docnum=1 %s -o %t
+# RUN: yaml2obj --docnum=2 %s -o %t.2
+# RUN: yaml2obj --docnum=3 %s -o %t.o
+# RUN: yaml2obj --docnum=4 %s -o %t.3
 
 ## Warn if no section covers any part of the specified range.
 

diff  --git a/llvm/test/tools/llvm-readobj/COFF/unwind-arm64-image.yaml b/llvm/test/tools/llvm-readobj/COFF/unwind-arm64-image.yaml
index 67305ee6677f..fa8471f63a53 100644
--- a/llvm/test/tools/llvm-readobj/COFF/unwind-arm64-image.yaml
+++ b/llvm/test/tools/llvm-readobj/COFF/unwind-arm64-image.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.exe
+# RUN: yaml2obj %s -o %t.exe
 # RUN: llvm-readobj --unwind %t.exe | FileCheck %s
 
 # CHECK:        RuntimeFunction {

diff  --git a/llvm/test/tools/llvm-readobj/COFF/unwind-x86_64-image.yaml b/llvm/test/tools/llvm-readobj/COFF/unwind-x86_64-image.yaml
index c62ef240d107..5780cf7a0467 100644
--- a/llvm/test/tools/llvm-readobj/COFF/unwind-x86_64-image.yaml
+++ b/llvm/test/tools/llvm-readobj/COFF/unwind-x86_64-image.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.exe
+# RUN: yaml2obj %s -o %t.exe
 # RUN: llvm-readobj --unwind %t.exe | FileCheck %s
 
 # CHECK:         RuntimeFunction {

diff  --git a/llvm/test/tools/llvm-readobj/ELF/demangle.test b/llvm/test/tools/llvm-readobj/ELF/demangle.test
index 29181cf1b4cd..230ba9209333 100644
--- a/llvm/test/tools/llvm-readobj/ELF/demangle.test
+++ b/llvm/test/tools/llvm-readobj/ELF/demangle.test
@@ -1,7 +1,7 @@
 ## Show that llvm-readelf + llvm-readobj demangle symbol names in symbol tables
 ## (including dynamic symbols), relocations (including dynamic relocations), and groups.
 
-# RUN: yaml2obj %s > %t.so
+# RUN: yaml2obj %s -o %t.so
 
 ## Check LLVM output style.
 # RUN: llvm-readobj --symbols --relocations --dyn-symbols --dyn-relocations \

diff  --git a/llvm/test/tools/llvm-readobj/ELF/gnu-note-size.test b/llvm/test/tools/llvm-readobj/ELF/gnu-note-size.test
index ea01d5b78146..d7421da5e0ee 100644
--- a/llvm/test/tools/llvm-readobj/ELF/gnu-note-size.test
+++ b/llvm/test/tools/llvm-readobj/ELF/gnu-note-size.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-readelf --notes %t | FileCheck %s --check-prefix=GNU
 # RUN: llvm-readobj --elf-output-style LLVM --notes %t | FileCheck %s --check-prefix=LLVM
 

diff  --git a/llvm/test/tools/llvm-readobj/ELF/gnu-notes.test b/llvm/test/tools/llvm-readobj/ELF/gnu-notes.test
index a625c024b00b..211f79a0cab8 100644
--- a/llvm/test/tools/llvm-readobj/ELF/gnu-notes.test
+++ b/llvm/test/tools/llvm-readobj/ELF/gnu-notes.test
@@ -1,6 +1,6 @@
 ## Test tools are able to dump 
diff erent types of notes.
 
-# RUN: yaml2obj --docnum=1 %s > %t1.so
+# RUN: yaml2obj --docnum=1 %s -o %t1.so
 # RUN: llvm-readelf --notes %t1.so | FileCheck %s --check-prefix=GNU --strict-whitespace --match-full-lines
 # RUN: llvm-readobj --notes %t1.so | FileCheck %s --check-prefix=LLVM
 # RUN: llvm-objcopy --strip-sections %t1.so %t1.stripped.so
@@ -104,7 +104,7 @@ ProgramHeaders:
 ## Test tools report an error if a note section has an invalid offset
 ## that goes past the end of file.
 
-# RUN: yaml2obj --docnum=2 %s > %t2.so
+# RUN: yaml2obj --docnum=2 %s -o %t2.so
 # RUN: not llvm-readelf --notes %t2.so 2>&1 | FileCheck -DFILE=%t2.so %s --check-prefix=ERR1
 # RUN: not llvm-readobj --notes %t2.so 2>&1 | FileCheck -DFILE=%t2.so %s --check-prefix=ERR1
 
@@ -125,7 +125,7 @@ Sections:
 ## Test tools report an error if a note section has invalid size
 ## that goes past the end of file.
 
-# RUN: yaml2obj --docnum=3 %s > %t3.so
+# RUN: yaml2obj --docnum=3 %s -o %t3.so
 # RUN: not llvm-readelf --notes %t3.so 2>&1 | FileCheck -DFILE=%t3.so %s --check-prefix=ERR2
 # RUN: not llvm-readobj --notes %t3.so 2>&1 | FileCheck -DFILE=%t3.so %s --check-prefix=ERR2
 
@@ -146,7 +146,7 @@ Sections:
 ## Test tools report an error if a note program header has an invalid offset that
 ## goes past the end of file.
 
-# RUN: yaml2obj --docnum=4 %s > %t4.so
+# RUN: yaml2obj --docnum=4 %s -o %t4.so
 # RUN: not llvm-readelf --notes %t4.so 2>&1 | FileCheck -DFILE=%t4.so %s --check-prefix=ERR3
 # RUN: not llvm-readobj --notes %t4.so 2>&1 | FileCheck -DFILE=%t4.so %s --check-prefix=ERR3
 
@@ -171,7 +171,7 @@ ProgramHeaders:
 ## Test tools report an error if a note program header has an invalid size that
 ## goes past the end of file.
 
-# RUN: yaml2obj --docnum=5 %s > %t5.so
+# RUN: yaml2obj --docnum=5 %s -o %t5.so
 # RUN: not llvm-readelf --notes %t5.so 2>&1 | FileCheck -DFILE=%t5.so  %s --check-prefix=ERR4
 # RUN: not llvm-readobj --notes %t5.so 2>&1 | FileCheck -DFILE=%t5.so %s --check-prefix=ERR4
 

diff  --git a/llvm/test/tools/llvm-readobj/ELF/note-amdgpu.test b/llvm/test/tools/llvm-readobj/ELF/note-amdgpu.test
index 51440dd4a5b6..097dbfbbe08b 100644
--- a/llvm/test/tools/llvm-readobj/ELF/note-amdgpu.test
+++ b/llvm/test/tools/llvm-readobj/ELF/note-amdgpu.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-readobj --notes %t.o | FileCheck %s --check-prefix=LLVM
 # RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU
 

diff  --git a/llvm/test/tools/llvm-readobj/ELF/note-core-ntfile.test b/llvm/test/tools/llvm-readobj/ELF/note-core-ntfile.test
index b5dc684dc42f..a1a5725af52d 100644
--- a/llvm/test/tools/llvm-readobj/ELF/note-core-ntfile.test
+++ b/llvm/test/tools/llvm-readobj/ELF/note-core-ntfile.test
@@ -1,6 +1,6 @@
 ## Test that NT_FILE sections in core files are interpreted correctly.
 
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU
 # RUN: llvm-readobj --notes %t.o | FileCheck %s --check-prefix=LLVM
 

diff  --git a/llvm/test/tools/llvm-readobj/ELF/note-core.test b/llvm/test/tools/llvm-readobj/ELF/note-core.test
index 314be84d7d79..0aa163dbaf8a 100644
--- a/llvm/test/tools/llvm-readobj/ELF/note-core.test
+++ b/llvm/test/tools/llvm-readobj/ELF/note-core.test
@@ -1,6 +1,6 @@
 ## Test that note values are interpreted correctly for core files.
 
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU
 # RUN: llvm-readobj --notes %t.o | FileCheck %s --check-prefix=LLVM
 

diff  --git a/llvm/test/tools/llvm-readobj/ELF/reloc-symbol-with-versioning.test b/llvm/test/tools/llvm-readobj/ELF/reloc-symbol-with-versioning.test
index 8fa191984d53..5bf06566a449 100644
--- a/llvm/test/tools/llvm-readobj/ELF/reloc-symbol-with-versioning.test
+++ b/llvm/test/tools/llvm-readobj/ELF/reloc-symbol-with-versioning.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-readobj --demangle -r %t.o | FileCheck %s --check-prefix LLVM
 # RUN: llvm-readelf --demangle -r %t.o | FileCheck %s --check-prefix GNU
 

diff  --git a/llvm/test/tools/llvm-readobj/ELF/stack-sizes.test b/llvm/test/tools/llvm-readobj/ELF/stack-sizes.test
index 3d001b104954..d1f6dabdbf08 100644
--- a/llvm/test/tools/llvm-readobj/ELF/stack-sizes.test
+++ b/llvm/test/tools/llvm-readobj/ELF/stack-sizes.test
@@ -1,7 +1,7 @@
 ## Check that we correctly display the contents of the .stack_sizes section
 ## in a relocatable object file.
 
-# RUN: yaml2obj --docnum=1 %s > %t01
+# RUN: yaml2obj --docnum=1 %s -o %t01
 # RUN: llvm-readelf --stack-sizes %t01 \
 # RUN:   | FileCheck %s --check-prefix=RELOC-GNU --strict-whitespace --match-full-lines
 # RUN: llvm-readobj --stack-sizes %t01 | FileCheck %s --check-prefix=RELOC-LLVM
@@ -94,7 +94,7 @@ Symbols:
 ## Check that we correctly report the stack sizes in an executable (non-relocatable)
 ## object file.
 
-# RUN: yaml2obj --docnum=2 %s > %t02
+# RUN: yaml2obj --docnum=2 %s -o %t02
 # RUN: llvm-readelf --stack-sizes %t02 \
 # RUN:   | FileCheck %s --check-prefix=EXEC-GNU --strict-whitespace --match-full-lines
 # RUN: llvm-readobj --stack-sizes %t02 | FileCheck %s --check-prefix=EXEC-LLVM
@@ -149,7 +149,7 @@ Symbols:
 ## Check that we report an error when we find relocations whose offsets point outside
 ## of the .stack_sizes section.
 
-# RUN: yaml2obj --docnum=3 %s > %t03
+# RUN: yaml2obj --docnum=3 %s -o %t03
 # RUN: not llvm-readelf --stack-sizes %t03 2>&1 | FileCheck %s --check-prefix=SHORT -DFILE=%t03
 # RUN: not llvm-readobj --stack-sizes %t03 2>&1 | FileCheck %s --check-prefix=SHORT -DFILE=%t03
 
@@ -186,7 +186,7 @@ Symbols:
 ## Check that we warn about a function symbol that is not in the section
 ## that is referenced by the stack sizes section's sh_link.
 
-# RUN: yaml2obj --docnum=4 %s > %t04
+# RUN: yaml2obj --docnum=4 %s -o %t04
 # RUN: llvm-readelf --stack-sizes %t04 2> %t04-gnu.err | FileCheck %s --check-prefix=WRONGSECTION-GNU
 # RUN: FileCheck %s < %t04-gnu.err --check-prefix=WRONGSECTION-ERR -DFILE=%t04
 # RUN: llvm-readobj --stack-sizes %t04 2> %t04-llvm.err | FileCheck %s --check-prefix=WRONGSECTION-LLVM
@@ -242,7 +242,7 @@ Symbols:
 
 ## Check that we report an error when a stack sizes section ends with an incomplete stack size entry.
 
-# RUN: yaml2obj --docnum=5 %s > %t05
+# RUN: yaml2obj --docnum=5 %s -o %t05
 # RUN: not llvm-readelf --stack-sizes %t05 2>&1 | \
 # RUN:    FileCheck %s --check-prefix=SUDDENEND -DFILE=%t05
 # RUN: not llvm-readobj --stack-sizes %t05 2>&1 | \
@@ -275,7 +275,7 @@ Symbols:
 ## Check that we report an invalid stack size, which is represented by a ULEB that
 ## ends in a byte with the high bit set.
 
-# RUN: yaml2obj --docnum=6 %s > %t06
+# RUN: yaml2obj --docnum=6 %s -o %t06
 # RUN: not llvm-readelf --stack-sizes %t06 2>&1 | FileCheck %s --check-prefix=BADSIZE -DFILE=%t06
 # RUN: not llvm-readobj --stack-sizes %t06 2>&1 | FileCheck %s --check-prefix=BADSIZE -DFILE=%t06
 
@@ -307,7 +307,7 @@ Symbols:
 ## valid section. We expect a stack size entry with an unknown symbol in the 
 ## output.
 
-# RUN: yaml2obj --docnum=7 %s > %t07
+# RUN: yaml2obj --docnum=7 %s -o %t07
 # RUN: llvm-readelf --stack-sizes %t07 2> %t07-gnu.err | FileCheck %s --check-prefix=BADSECTION-OUT-GNU
 # RUN: FileCheck %s < %t07-gnu.err --check-prefix=BADSECTION-ERR -DFILE=%t07
 # RUN: llvm-readobj --stack-sizes %t07 2> %t07-llvm.err | FileCheck %s --check-prefix=BADSECTION-OUT-LLVM
@@ -361,7 +361,7 @@ Symbols:
 ## Check that we report a warning when a stack sizes section does not come with
 ## a corresponding relocation section.
 
-# RUN: yaml2obj --docnum=8 %s > %t08
+# RUN: yaml2obj --docnum=8 %s -o %t08
 # RUN: llvm-readelf --stack-sizes %t08 2> %t08-gnu.err | FileCheck %s --check-prefix=NORELOCSECTION-OUT-GNU
 # RUN: FileCheck %s < %t08-gnu.err --check-prefix=NORELOCSECTION-ERR -DFILE=%t08
 # RUN: llvm-readobj --stack-sizes %t08 2> %t08-llvm.err | FileCheck %s --check-prefix=NORELOCSECTION-OUT-LLVM
@@ -454,7 +454,7 @@ Sections:
 ## Check that we do not consider symbols that are not function symbols, even though
 ## a relocation references them. 
 
-# RUN: yaml2obj --docnum=9 %s > %t14
+# RUN: yaml2obj --docnum=9 %s -o %t14
 # RUN: llvm-readelf --stack-sizes %t14 2> %t14-gnu.err | FileCheck %s --check-prefix=NONFUNCTIONSYM-GNU
 # RUN: FileCheck %s < %t14-gnu.err --check-prefix=NONFUNCTIONSYM-ERR -DFILE=%t14
 # RUN: llvm-readobj --stack-sizes %t14 2> %t14-llvm.err | FileCheck %s --check-prefix=NONFUNCTIONSYM-LLVM
@@ -503,7 +503,7 @@ Symbols:
 ## Check that we report an error when we find an unsupported relocation
 ## in the section that contains the stack size entries' relocations.
 
-# RUN: yaml2obj --docnum=10 %s > %t15
+# RUN: yaml2obj --docnum=10 %s -o %t15
 # RUN: not llvm-readelf --stack-sizes %t15 2>&1 | FileCheck %s --check-prefix=UNSUPPRELOC -DFILE=%t15
 # RUN: not llvm-readobj --stack-sizes %t15 2>&1 | FileCheck %s --check-prefix=UNSUPPRELOC -DFILE=%t15
 
@@ -585,7 +585,7 @@ Symbols:
 
 ## Check that we demangle function names when requested.
 
-# RUN: yaml2obj --docnum=11 %s > %t16
+# RUN: yaml2obj --docnum=11 %s -o %t16
 # RUN: llvm-readelf --stack-sizes --demangle %t16 | FileCheck %s --check-prefix=DEMANGLE-GNU
 # RUN: llvm-readobj --stack-sizes --demangle %t16 | FileCheck %s --check-prefix=DEMANGLE-LLVM
 
@@ -619,7 +619,7 @@ Symbols:
 ## Check that we report an error when we are unable to resolve a relocation for a given ELF architecture.
 ## Here we have a 64-bit relocation used in a 32-bit object.
 
-# RUN: yaml2obj --docnum=12 %s > %t17
+# RUN: yaml2obj --docnum=12 %s -o %t17
 # RUN: not llvm-readelf --stack-sizes %t17 2>&1 | FileCheck %s -DFILE=%t17 --check-prefix=UNSUPPRELOC2
 # RUN: not llvm-readobj --stack-sizes %t17 2>&1 | FileCheck %s -DFILE=%t17 --check-prefix=UNSUPPRELOC2
 
@@ -646,7 +646,7 @@ Sections:
 ## identified by the sh_info field is invalid. Here the sh_info value is larger than
 ## the number of sections.
 
-# RUN: yaml2obj --docnum=13 %s > %t18
+# RUN: yaml2obj --docnum=13 %s -o %t18
 # RUN: not llvm-readelf --stack-sizes %t18 2>&1 | FileCheck %s -DFILE=%t18 --check-prefix=INVALID-TARGET
 # RUN: not llvm-readobj --stack-sizes %t18 2>&1 | FileCheck %s -DFILE=%t18 --check-prefix=INVALID-TARGET
 

diff  --git a/llvm/test/tools/llvm-readobj/ELF/string-dump.test b/llvm/test/tools/llvm-readobj/ELF/string-dump.test
index cfd9a03ed6c5..ba20b1787881 100644
--- a/llvm/test/tools/llvm-readobj/ELF/string-dump.test
+++ b/llvm/test/tools/llvm-readobj/ELF/string-dump.test
@@ -1,5 +1,5 @@
 # Check the dumping of a section as strings.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 
 # RUN: llvm-readobj --string-dump=.strings \
 # RUN:   --string-dump=.not_null_terminated %t > %t.readobj.out

diff  --git a/llvm/test/tools/llvm-readobj/ELF/symbol-64bit.test b/llvm/test/tools/llvm-readobj/ELF/symbol-64bit.test
index dbd8f0e54b69..dae621ffd1b2 100644
--- a/llvm/test/tools/llvm-readobj/ELF/symbol-64bit.test
+++ b/llvm/test/tools/llvm-readobj/ELF/symbol-64bit.test
@@ -1,7 +1,7 @@
 # Show that both GNU and LLVM styles can properly print symbol values and sizes
 # that do not fit in 32-bit integers.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-readobj --symbols %t | FileCheck %s --check-prefix=LLVM
 # RUN: llvm-readelf --symbols %t | FileCheck %s --check-prefix=GNU
 

diff  --git a/llvm/test/tools/llvm-readobj/ELF/symbol-binding.test b/llvm/test/tools/llvm-readobj/ELF/symbol-binding.test
index 9ca5142abae4..bfd269882f62 100644
--- a/llvm/test/tools/llvm-readobj/ELF/symbol-binding.test
+++ b/llvm/test/tools/llvm-readobj/ELF/symbol-binding.test
@@ -1,7 +1,7 @@
 # Show that llvm-readobj can print symbol bindings correctly for both LLVM and
 # GNU styles, including for symbol bindings that are not recognised.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-readobj --symbols --dyn-symbols %t | FileCheck %s --check-prefix=LLVM
 # RUN: llvm-readelf --symbols --dyn-symbols %t | FileCheck %s --check-prefix=GNU
 

diff  --git a/llvm/test/tools/llvm-readobj/ELF/symbol-shndx.test b/llvm/test/tools/llvm-readobj/ELF/symbol-shndx.test
index ab01da9c842f..5639e43155d9 100644
--- a/llvm/test/tools/llvm-readobj/ELF/symbol-shndx.test
+++ b/llvm/test/tools/llvm-readobj/ELF/symbol-shndx.test
@@ -3,7 +3,7 @@
 ## section), reserved values and processor/os-specific index values, for both GNU
 ## and LLVM styles.
 
-# RUN: yaml2obj --docnum=1 %s > %t1
+# RUN: yaml2obj --docnum=1 %s -o %t1
 # RUN: llvm-readobj --symbols %t1 | FileCheck %s --check-prefix=LLVM1
 # RUN: llvm-readelf --symbols %t1 | FileCheck %s --check-prefix=GNU1
 
@@ -85,7 +85,7 @@ Symbols:
 ## In this case, the index does not correspond to a real section. Check that GNU
 ## style just prints the section index as normal and LLVM style prints a warning
 ## (but only once for each warning).
-# RUN: yaml2obj --docnum=2 %s > %t2
+# RUN: yaml2obj --docnum=2 %s -o %t2
 # RUN: llvm-readobj --symbols %t2 2> %t2.llvm.err | FileCheck %s --check-prefix=LLVM2
 # RUN: FileCheck %s --input-file=%t2.llvm.err --check-prefix=BAD-SHNDX --implicit-check-not=warning
 # RUN: llvm-readelf --symbols %t2 2> %t2.gnu.err | FileCheck %s --check-prefix=GNU2
@@ -152,7 +152,7 @@ Symbols:
 
 ## In this case, the symtab shndx section is missing, so symbols with section
 ## indexes of SHN_XINDEX print as Reserved symbols.
-# RUN: yaml2obj --docnum=3 %s > %t3
+# RUN: yaml2obj --docnum=3 %s -o %t3
 # RUN: llvm-readobj --symbols %t3 2> %t3.llvm.err | FileCheck %s --check-prefix=LLVM3
 # RUN: FileCheck %s --input-file=%t3.llvm.err --check-prefix=NO-SYMTAB-SHNDX --implicit-check-not=warning
 # RUN: llvm-readelf --symbols %t3 2> %t3.gnu.err | FileCheck %s --check-prefix=GNU3

diff  --git a/llvm/test/tools/llvm-readobj/ELF/symbol-types.test b/llvm/test/tools/llvm-readobj/ELF/symbol-types.test
index 3d0ba4a48082..c6f65ea1adf3 100644
--- a/llvm/test/tools/llvm-readobj/ELF/symbol-types.test
+++ b/llvm/test/tools/llvm-readobj/ELF/symbol-types.test
@@ -2,7 +2,7 @@
 # and also for unknown types, both in the os/processor specific ranges and not,
 # for both GNU and LLVM styles.
 
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: llvm-readobj --symbols %t | FileCheck %s --check-prefix=LLVM
 # RUN: llvm-readelf --symbols %t | FileCheck %s --check-prefix=GNU
 

diff  --git a/llvm/test/tools/llvm-readobj/ELF/symbol-visibility.test b/llvm/test/tools/llvm-readobj/ELF/symbol-visibility.test
index bdc66d77472e..752410bb5e81 100644
--- a/llvm/test/tools/llvm-readobj/ELF/symbol-visibility.test
+++ b/llvm/test/tools/llvm-readobj/ELF/symbol-visibility.test
@@ -4,7 +4,7 @@
 ## Check how we dump symbols when they have only STV_* bits set for st_other.
 ## (This is the most common case).
 
-# RUN: yaml2obj --docnum=1 %s > %t1.o
+# RUN: yaml2obj --docnum=1 %s -o %t1.o
 # RUN: llvm-readobj --symbols %t1.o | FileCheck %s --check-prefix=LLVM
 # RUN: llvm-readelf --symbols %t1.o | FileCheck %s --strict-whitespace --check-prefix=GNU
 
@@ -52,7 +52,7 @@ Symbols:
 
 ## Check the output when we have non-visibility bits set for at least one of the symbols.
 
-# RUN: yaml2obj --docnum=2 %s > %t2.o
+# RUN: yaml2obj --docnum=2 %s -o %t2.o
 # RUN: llvm-readobj --symbols %t2.o | FileCheck %s --check-prefixes=LLVM,LLVM-OTHER
 # RUN: llvm-readelf --symbols %t2.o | FileCheck %s --strict-whitespace --check-prefix=GNU-OTHER
 

diff  --git a/llvm/test/tools/llvm-readobj/ELF/unwind.test b/llvm/test/tools/llvm-readobj/ELF/unwind.test
index a9e34f7a294b..17cd2f572e53 100644
--- a/llvm/test/tools/llvm-readobj/ELF/unwind.test
+++ b/llvm/test/tools/llvm-readobj/ELF/unwind.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.exe
+# RUN: yaml2obj %s -o %t.exe
 # RUN: llvm-readobj --unwind %t.exe | FileCheck %s
 
 # CHECK:      EHFrameHeader {

diff  --git a/llvm/test/tools/llvm-readobj/MachO/sections.test b/llvm/test/tools/llvm-readobj/MachO/sections.test
index 1d2ab068f50b..b181575f7b3a 100644
--- a/llvm/test/tools/llvm-readobj/MachO/sections.test
+++ b/llvm/test/tools/llvm-readobj/MachO/sections.test
@@ -1,7 +1,7 @@
 ## Check how we print sections.
 
 ## Show that llvm-readobj prints MachO all section types properly.
-# RUN: yaml2obj --docnum=1 %s > %t1
+# RUN: yaml2obj --docnum=1 %s -o %t1
 # RUN: llvm-readobj --sections %t1 | FileCheck %s
 
 # CHECK:  Type: Regular (0x0)

diff  --git a/llvm/test/tools/llvm-size/elf-berkeley.test b/llvm/test/tools/llvm-size/elf-berkeley.test
index 96eaca73dbce..88557ace90e3 100644
--- a/llvm/test/tools/llvm-size/elf-berkeley.test
+++ b/llvm/test/tools/llvm-size/elf-berkeley.test
@@ -2,7 +2,7 @@
 ## format. It also shows that the formatting is correct (including using tabs as
 ## field separators).
 
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 
 # RUN: llvm-size -B %t.o \
 # RUN:   | FileCheck %s --match-full-lines --strict-whitespace -DFILE=%t.o --implicit-check-not={{.}}

diff  --git a/llvm/test/tools/llvm-size/elf-sysv.test b/llvm/test/tools/llvm-size/elf-sysv.test
index 434cd5b73014..2ecf4418a8e4 100644
--- a/llvm/test/tools/llvm-size/elf-sysv.test
+++ b/llvm/test/tools/llvm-size/elf-sysv.test
@@ -4,7 +4,7 @@
 ## FIXME: The rules demonstrated by this test are not quite what GNU size
 ## follows. See https://bugs.llvm.org/show_bug.cgi?id=42934.
 
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 # RUN: llvm-size --format=sysv %t.o \
 # RUN:   | FileCheck %s --match-full-lines --strict-whitespace -DFILE=%t.o --implicit-check-not={{.}}
 # RUN: llvm-size -A %t.o \

diff  --git a/llvm/test/tools/obj2yaml/section-group.test b/llvm/test/tools/obj2yaml/section-group.test
index 111bffda8e58..cab6fd592331 100644
--- a/llvm/test/tools/obj2yaml/section-group.test
+++ b/llvm/test/tools/obj2yaml/section-group.test
@@ -1,6 +1,6 @@
 ## Checks that the tool is able to read section groups from ELF.
 
-# RUN: yaml2obj --docnum=1 %s > %t1.o
+# RUN: yaml2obj --docnum=1 %s -o %t1.o
 # RUN: llvm-readobj --elf-section-groups %t1.o | FileCheck %s -check-prefix=OBJ
 # RUN: obj2yaml %t1.o | FileCheck %s --check-prefix YAML
 
@@ -50,7 +50,7 @@ Symbols:
 ## Check obj2yaml report an error when sh_info field of
 ## group section contains invalid (too large) signature symbol index.
 
-# RUN: yaml2obj --docnum=2 %s > %t2.o
+# RUN: yaml2obj --docnum=2 %s -o %t2.o
 # RUN: not obj2yaml %t2.o 2>&1 | FileCheck %s --check-prefix ERR
 
 --- !ELF

diff  --git a/llvm/test/tools/obj2yaml/special-symbol-indices.yaml b/llvm/test/tools/obj2yaml/special-symbol-indices.yaml
index 9ba424101ed2..27ccb77a82ae 100644
--- a/llvm/test/tools/obj2yaml/special-symbol-indices.yaml
+++ b/llvm/test/tools/obj2yaml/special-symbol-indices.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: obj2yaml %t | FileCheck %s
 
 ## Test checks that we are able to handle symbols with special/reserved indices.

diff  --git a/llvm/test/tools/obj2yaml/symbol-type.yaml b/llvm/test/tools/obj2yaml/symbol-type.yaml
index 8183143623f1..fe541b575364 100644
--- a/llvm/test/tools/obj2yaml/symbol-type.yaml
+++ b/llvm/test/tools/obj2yaml/symbol-type.yaml
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
 # RUN: obj2yaml %t | FileCheck %s
 
 # CHECK:      Symbols:

diff  --git a/llvm/test/tools/sanstats/elf.test b/llvm/test/tools/sanstats/elf.test
index 344384721e17..b8f2d5d5b4f9 100644
--- a/llvm/test/tools/sanstats/elf.test
+++ b/llvm/test/tools/sanstats/elf.test
@@ -1,5 +1,5 @@
-# RUN: yaml2obj %s > %t1.o
-# RUN: yaml2obj %s > %t2.o
+# RUN: yaml2obj %s -o %t1.o
+# RUN: yaml2obj %s -o %t2.o
 
 # RUN: printf "\x04" > %t.stats
 

diff  --git a/llvm/test/tools/yaml2obj/ELF/symbol-name.yaml b/llvm/test/tools/yaml2obj/ELF/symbol-name.yaml
index 06815b4634d7..eb07eaeaced7 100644
--- a/llvm/test/tools/yaml2obj/ELF/symbol-name.yaml
+++ b/llvm/test/tools/yaml2obj/ELF/symbol-name.yaml
@@ -1,6 +1,6 @@
 ## Check we are able to use integers as both
 ## symbol name indices (st_name values) and symbol names.
-# RUN: yaml2obj --docnum=1 %s > %t
+# RUN: yaml2obj --docnum=1 %s -o %t
 # RUN: llvm-readobj --symbols %t | FileCheck %s
 
 # CHECK: Name: test (1)

diff  --git a/llvm/test/tools/yaml2obj/ELF/symbol-stother.yaml b/llvm/test/tools/yaml2obj/ELF/symbol-stother.yaml
index 997a4b0be55f..27a0e93e8391 100644
--- a/llvm/test/tools/yaml2obj/ELF/symbol-stother.yaml
+++ b/llvm/test/tools/yaml2obj/ELF/symbol-stother.yaml
@@ -19,7 +19,7 @@ Symbols:
 ## Test that STO_* can be used with their correct machine type.
 ## We use the same YAML as above, but with a change of machine type.
 
-# RUN: yaml2obj --docnum=2 %s > %t2
+# RUN: yaml2obj --docnum=2 %s -o %t2
 # RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=USE-OTHER
 
 # USE-OTHER:      Name: foo
@@ -40,7 +40,7 @@ Symbols:
 ## Test that we can mix named and unnamed constants and set
 ## st_other to any arbitrary value.
 
-# RUN: yaml2obj --docnum=3 %s > %t3
+# RUN: yaml2obj --docnum=3 %s -o %t3
 # RUN: llvm-readobj --symbols %t3 | FileCheck %s --check-prefix=VALUE
 
 # VALUE:      Name: foo


        


More information about the llvm-commits mailing list