[PATCH] D59212: Include an archive file name in an error message for a bad file.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 11:41:44 PDT 2019


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lld/ELF/InputFiles.cpp:1204
   if (Endian != ELFDATA2LSB && Endian != ELFDATA2MSB)
-    fatal(MB.getBufferIdentifier() + ": invalid data encoding");
+    Fatal("invalid data encoding");
   if (Size != ELFCLASS32 && Size != ELFCLASS64)
----------------
Not directly a comment on this change... but maybe we should also change the text of these error messages to indicate a general cause in addition to the specific cause, something like "corrupt ELF file (invalid data encoding)".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59212





More information about the llvm-commits mailing list