[PATCH] D127753: [lld-macho] Group undefined symbol diagnostics by symbol

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 10:38:56 PDT 2022


thakis added inline comments.


================
Comment at: lld/MachO/SymbolTable.cpp:349-355
+  struct SectionAndOffset {
+    const InputSection *isec;
+    uint64_t offset;
+  };
+
+  std::vector<std::string> namedLocs;
+  std::vector<SectionAndOffset> relocLocs;
----------------
BertalanD wrote:
> int3 wrote:
> > Something like `-u` isn't really a location. It makes more sense to me to use `Loc` to mean section+offset, like LLD-ELF is doing.
> > 
> > How about calling this something like `namedSources`, given that `treatUndefinedSymbol` already calls the same value `source`?
> That's a much better name, thanks for the suggestion!
> 
> Is `relocLocs` fine as is, or do you have a better idea for it? I know it doesn't have the best name.
Maybe `codeReferences` for the relocs and `otherReferences` for the named ones? But the current names work for me personally too. Let's see if Jez has a preference.


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

https://reviews.llvm.org/D127753



More information about the llvm-commits mailing list