[PATCH] D118570: [lld-macho] Add support for -image_base, -static, -pagezero_size, and -version_load_command

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 10:51:05 PST 2022


MaskRay added inline comments.


================
Comment at: lld/MachO/Writer.cpp:856
+  if (config->outputType == MH_EXECUTE) {
+    if (!config->staticLink)
+      in.header->addLoadCommand(make<LCMain>());
----------------
Prefer `if (xxx)` to `if (!xxx)` if both then and else branches are needed.


================
Comment at: lld/include/lld/Common/Args.h:34
+uint64_t getHexUnsigned(llvm::opt::InputArgList &args, unsigned key,
+                        uint64_t Default);
+
----------------
`Default` is a leftover when the variable naming switches to `lowerCase`. Perhaps `defaultVal`


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

https://reviews.llvm.org/D118570



More information about the llvm-commits mailing list