[PATCH] D63395: [llvm-objcopy][MachO] Support load commands used in executables/shared libraries

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 03:41:01 PDT 2019


MaskRay added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/MachO/MachOReader.cpp:227
+
+  O.DataInCode.Data = ArrayRef<uint8_t>(
+      reinterpret_cast<uint8_t *>(
----------------
This can be written as: `arrayRefFromStringRef(MachOObj.getData().substr(...));`


================
Comment at: llvm/tools/llvm-objcopy/MachO/MachOReader.cpp:240
+
+  O.FunctionStarts.Data = ArrayRef<uint8_t>(
+      reinterpret_cast<uint8_t *>(
----------------
arrayRefFromStringRef


================
Comment at: llvm/tools/llvm-objcopy/MachO/MachOWriter.cpp:455
+    if (DySymTabCommand.indirectsymoff)
+      Queue.push_back({DySymTabCommand.indirectsymoff,
+                       &MachOWriter::writeIndirectSymbolTable});
----------------
emplace_back saves a pair of `{}`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63395





More information about the llvm-commits mailing list