[PATCH] D105866: [lld-macho] Use intermediate arrays to store opcodes

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 15 13:03:08 PDT 2021


oontvoo added inline comments.


================
Comment at: lld/MachO/SyntheticSections.cpp:333
 
+static void flushOpcodes(BindOpcodeOpt &op, raw_svector_ostream &os) {
+  uint8_t opcode = op.opcode & 0xF0;
----------------
Can this be `const &` instead? `op` isn't being modified by this.


================
Comment at: lld/MachO/SyntheticSections.cpp:447
+                    lastBinding, opcodes);
+    for (auto &op : opcodes)
+      flushOpcodes(op, os);
----------------
`const auto&` ?


================
Comment at: lld/MachO/SyntheticSections.cpp:479
+                    lastBinding, opcodes);
+    for (auto &op : opcodes)
+      flushOpcodes(op, os);
----------------
`const auto&` ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105866



More information about the llvm-commits mailing list