[PATCH] D125785: [llvm-ar][test] add special case of replace converting a regular to a thin archive

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 03:08:43 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc913c5598b02: [llvm-ar][test] add special case of replace converting a regular to a thin… (authored by Ben Dunbobbin <Ben.Dunbobbin at sony.com>).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125785/new/

https://reviews.llvm.org/D125785

Files:
  llvm/test/tools/llvm-ar/regular-to-thin-archive-special.test


Index: llvm/test/tools/llvm-ar/regular-to-thin-archive-special.test
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-ar/regular-to-thin-archive-special.test
@@ -0,0 +1,15 @@
+## 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>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125785.432510.patch
Type: text/x-patch
Size: 834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220527/d1d3a814/attachment.bin>


More information about the llvm-commits mailing list