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

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 16 11:03:39 PDT 2021


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


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


================
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:
----------------
gkm wrote:
> 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?
Most LLVM code is nice enough to return something other than a raw `int` for error handling. But if we find more use cases for this we can for sure factor it out


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