[PATCH] D128055: [llvm-ar] Improve MRI script CREATE command handling

Owen Reynolds via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 10:04:09 PDT 2022


gbreynoo added inline comments.


================
Comment at: llvm/test/tools/llvm-ar/mri-addlib.test:32
+
+# MISSING: error: script line 2: could not open library {{.*}} no such file or directory
+
----------------
jhenderson wrote:
> I believe you should use one of the %errc substitutions (I think `%errc_NOENT` if memory serves correctly, but look it up!)
> 
> That way, the message is platform independent. 
Thanks, didn't know about that.


================
Comment at: llvm/test/tools/llvm-ar/mri-addlib.test:39
+
+# SYMS2: f in {{.*}}
+# SYMS2: f in {{.*}}
----------------
MaskRay wrote:
> You may use `SYMS2-COUNT-2:`
Thanks, I didn't know about that.


================
Comment at: llvm/test/tools/llvm-ar/mri-create.test:114
+SAVE
\ No newline at end of file

----------------
I'll fix this before I commit


================
Comment at: llvm/tools/llvm-ar/llvm-ar.cpp:1066
+      if (!Create)
+        fail("no open output archive");
       object::Archive &Lib = readLibrary(Rest);
----------------
jhenderson wrote:
> MaskRay wrote:
> > output archive is not opened?
>  I prefer "no output archive has been opened"
I went with "no output archive has been opened" as it seemed clearer.


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

https://reviews.llvm.org/D128055



More information about the llvm-commits mailing list