[PATCH] D93711: [lld/mac] Don't add names of unreferenced symbols to string table

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 13:01:02 PST 2020


thakis added a comment.

Thanks!



================
Comment at: lld/MachO/SyntheticSections.cpp:699
+    uint32_t strx = stringTableSection.addString(sym->getName());
+    symbols.push_back({sym, strx});
+  };
----------------
compnerd wrote:
> Why not `emplace_back`?
That's annoying to use with structs pre c++20 (https://stackoverflow.com/questions/13812703/c11-emplace-back-on-vectorstruct) and in practice it won't matter.

(But that's the retconned answer. The actual reason is that the LHS used push_back and I didn't think about it ;) )


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

https://reviews.llvm.org/D93711



More information about the llvm-commits mailing list