Compiler projects using llvm
## Test regular archives do not convert to thin archives
## in the special case of replacing a single file in an
## archive with itself from the current directory.

# RUN: rm -rf %t && mkdir -p %t && cd %t
# RUN: echo "a" > a.txt
# RUN: llvm-ar --format=gnu cr foo.a a.txt 2>&1

## Check that an error is issued.
# RUN: not llvm-ar --format=gnu cr --thin foo.a a.txt 2>&1 | FileCheck %s
# CHECK: error: cannot convert a regular archive to a thin one

## Check that the archive is still the correct flavor.
# RUN: FileCheck --input-file=foo.a %s --check-prefix=REGULAR
# REGULAR: !<arch>