[PATCH] D129938: [lld-macho] Add support for -alias

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 17 14:50:12 PDT 2022


int3 added inline comments.


================
Comment at: lld/MachO/Driver.cpp:1566
 
+    for (auto pair : config->aliasedSymbols) {
+      if (auto *sym = symtab->find(std::get<0>(pair))) {
----------------
`const auto &`


================
Comment at: lld/MachO/Driver.cpp:1569
+        if (auto *defined = dyn_cast<Defined>(sym)) {
+          symtab->addDefined(std::get<1>(pair), defined->getFile(),
+                             defined->isec, defined->value, defined->size,
----------------
why not just `pair.second`


================
Comment at: lld/test/MachO/aliases.s:26-27
+
+# MAIN: _foo
+# MAIN: _main
+
----------------
would be nice to check that the addresses are the same too


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129938



More information about the llvm-commits mailing list