[PATCH] D146672: [ifs] Print an error when llvm-ifs is supplied with an unknown arch

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 01:21:57 PDT 2023


jhenderson added inline comments.


================
Comment at: llvm/lib/InterfaceStub/IFSHandler.cpp:199-201
+      return make_error<StringError>(
+          "IFS Arch '" + *Stub->Target.ArchString + "' is unsupported.",
+          std::make_error_code(std::errc::invalid_argument));
----------------
I know this is following existing practice a few lines up, but 1) could this use `createStringError` and 2) don't end error messages in a full stop (see the coding standards).


================
Comment at: llvm/tools/llvm-ifs/llvm-ifs.cpp:339
+    if (eMachine == ELF::EM_NONE) {
+      fatalError(Twine("Unknown arch '") + A->getValue() + "'!");
+    }
----------------
Similar to above: no leading capital error or trailing punctuation at the end of an error message (see the coding standards).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146672



More information about the llvm-commits mailing list