[PATCH] D127753: [lld-macho] Group undefined symbol diagnostics by symbol
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 08:59:44 PDT 2022
int3 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;
----------------
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`?
================
Comment at: lld/MachO/SymbolTable.cpp:360
+
+void lld::macho::reportPendingUndefinedSymbols() {
+ for (const auto &undef : undefs) {
----------------
================
Comment at: lld/MachO/SymbolTable.cpp:371
+ size_t i = 0;
+ for (const auto &named : locations.namedLocs) {
+ if (i >= maxUndefinedReferences)
----------------
codebase convention is to use explicit types instead of `auto` unless the type is already mentioned on the same line, or if it's some complicated e.g. iterator type
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127753/new/
https://reviews.llvm.org/D127753
More information about the llvm-commits
mailing list