1## Test llvm-strip using the same input file more than once.
2## When using stdin ('-') more than once llvm-strip should give an error
3## while a file more than once should be simply a warning.
4
5# RUN: yaml2obj %s -o %t
6
7# RUN: not llvm-strip - - < %t 2>&1 | FileCheck -check-prefix=ERR %s
8# RUN: not llvm-strip - %t - < %t 2>&1 | FileCheck -check-prefix=ERR %s
9
10# ERR: error: cannot specify '-' as an input file more than once
11
12# RUN: cp %t %t2
13# RUN: llvm-strip %t %t %t %t2 %t2 2>&1 | FileCheck -check-prefix=WARN %s -DFILE=%t -DFILE2=%t2
14
15# WARN:      warning: '[[FILE]]' was already specified
16# WARN-NEXT: warning: '[[FILE2]]' was already specified
17
18--- !ELF
19FileHeader:
20  Class:   ELFCLASS64
21  Data:    ELFDATA2LSB
22  Type:    ET_REL
23  Machine: EM_X86_64
24Sections:
25  - Name:  .alloc
26    Type:  SHT_PROGBITS
27    Flags: [ SHF_ALLOC ]
28