[PATCH] D159294: [llvm-nm][MachO] Add support for `MH_FILESET`

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 07:51:45 PDT 2023


JDevlieghere added inline comments.


================
Comment at: llvm/include/llvm/BinaryFormat/MachO.h:901-906
+union lc_str {
+  uint32_t offset;
+#ifndef __LP64__
+  char *ptr;
+#endif
+};
----------------
Why is the ifdef necessary? At first I thought the layout of the struct is different for 32-bit vs 64-bit targets but looking at `loader.h` I don't see any immediate evidence of that. Either way, changing the layout based on a compile-time constant/host property seems almost guaranteed to be wrong.


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

https://reviews.llvm.org/D159294



More information about the llvm-commits mailing list