Compiler projects using llvm
## Test that -o sets the output file name.

# RUN: yaml2obj %s -o %t
# RUN: rm -f %t.yaml && obj2yaml %t -o %t.yaml
# RUN: ls %t.yaml
# RUN: rm -f %t.yaml && cat %t | obj2yaml -o%t.yaml
# RUN: ls %t.yaml

## In case of an error, don't create the output file.
# RUN: rm -f %t.yaml
# RUN: echo | not obj2yaml -o %t.yaml
# RUN: not ls %t.yaml

# RUN: not obj2yaml %t -o %p/path/does/not/exist 2>&1 | FileCheck -DMSG=%errc_ENOENT %s

# CHECK: obj2yaml: error: failed to open '{{.*}}/path/does/not/exist': [[MSG]]

!ELF
FileHeader:
  Class:   ELFCLASS64
  Data:    ELFDATA2LSB
  Type:    ET_REL
  Machine: EM_NONE