[PATCH] D83002: [llvm-libtool-darwin] Add support for -static option

Sameer Arora via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 1 15:41:10 PDT 2020


sameerarora101 marked an inline comment as done.
sameerarora101 added inline comments.


================
Comment at: llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp:56-70
+LLVM_ATTRIBUTE_NORETURN static void reportError(Twine Message) {
+  WithColor::error(errs(), ToolName) << Message << "\n";
+  errs().flush();
+  exit(EXIT_FAILURE);
+}
+
+LLVM_ATTRIBUTE_NORETURN static void reportError(StringRef File, Error E) {
----------------
> 5 There are some basic error handling functions available in the Support library which might do all you need them to. Consider using them before rolling your own. 

These error functions themselves are using basic error handling functions available in the Support library (e.g `logAllUnhandledErrors`). If I use `createStringError` available in the support library, I too would have to pass the error object as an argument to `logAllUnhandledErrors`. Wouldn't I be doing something similar to this only then (I copied these error functions from llvm-lipo) ? sorry if I missed something. Thanks



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83002





More information about the llvm-commits mailing list