[PATCH] D67038: Removes repetition in the error message.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 16 01:43:25 PDT 2019
jhenderson added inline comments.
================
Comment at: llvm/test/tools/llvm-ar/invalid-object-file.test:4
+RUN: touch %t1.txt
+RUN: not llvm-ar sc %t1.txt 2>&1 > /dev/null | FileCheck -allow-empty %s
+
----------------
Get rid of the `-allow-empty`. It's unnecessary, as an empty output is incorrect.
================
Comment at: llvm/test/tools/llvm-ar/invalid-object-file.test:9
+
+RUN: rm %t1.txt
----------------
You don't need to do this here. However, at the //start// of the test, you should delete the file.
================
Comment at: llvm/tools/llvm-ar/llvm-ar.cpp:930
object::Archive Archive(Buf.get()->getMemBufferRef(), Err);
- EC = errorToErrorCode(std::move(Err));
- failIfError(EC,
- "error loading '" + ArchiveName + "': " + EC.message() + "!");
+ failIfError(std::move(Err), "error loading '" + ArchiveName + "'");
if (Archive.isThin())
----------------
Since this ends up as "error: error loading ...", perhaps change "error loading" to "unable to load".
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67038/new/
https://reviews.llvm.org/D67038
More information about the llvm-commits
mailing list