[PATCH] D100650: [lld-macho] Initial groundwork for -bitcode_bundle

Greg McGary via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 16 09:40:23 PDT 2021


gkm accepted this revision.
gkm added a comment.

👍🏼



================
Comment at: lld/MachO/SyntheticSections.cpp:34-39
+#ifdef HAVE_LIBXAR
+extern "C" {
+#include <fcntl.h>
+#include <xar/xar.h>
+}
+#endif
----------------
These headers already internally have C(++) compatibility.


================
Comment at: lld/MachO/SyntheticSections.cpp:1047-1062
+class ErrorCodeWrapper {
+public:
+  ErrorCodeWrapper(std::error_code ec) : errorCode(ec.value()) {}
+  ErrorCodeWrapper(int ec) : errorCode(ec) {}
+  operator int() const { return errorCode; }
+
+private:
----------------
For my info ... what is special about xar errors that we need special error-handling infra? If it's not special, will other code benefit from the new infra?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100650



More information about the llvm-commits mailing list