[PATCH] D125439: Ensure that the MRI CREATE/CREATETHIN commands overwrite the output file appropriately
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 13 00:34:39 PDT 2022
jhenderson added a comment.
LGTM, apart from a typo and a couple of unnecessary steps in the test.
================
Comment at: llvm/test/tools/llvm-ar/mri-create-overwrite.test:3
+
+# RUN: rm -rf %t && mkdir -p %t
+# RUN: split-file %s %t
----------------
You don't need the mkdir: split-file creates it automatically. (Keep the rm though).
================
Comment at: llvm/test/tools/llvm-ar/mri-create-overwrite.test:8
+## Show that an existing file that is not an archive is overwritten by CREATE.
+# RUN: rm -f test.a
+# RUN: touch test.a
----------------
This is noise: you start off the test deleting everything, and don't recreate the file again by this point. Delete it.
================
Comment at: llvm/tools/llvm-ar/llvm-ar.cpp:1138
+ performOperation(ReplaceOrInsert, /*OldArchive=*/nullptr,
+ /*OldArchiveBu=f*/ nullptr, &NewMembers);
exit(0);
----------------
This line is apparently cursed to have typos in it :-D
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125439/new/
https://reviews.llvm.org/D125439
More information about the llvm-commits
mailing list