[PATCH] D113866: [LLD] [COFF] Omit IMAGE_SYM_CLASS_LABEL symbols from the PE symbol table
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 15 14:11:25 PST 2021
rnk added a comment.
Seems reasonable, just style nits
================
Comment at: lld/COFF/Writer.cpp:1213-1214
continue;
+ auto *dc = dyn_cast_or_null<DefinedCOFF>(d);
+ if (dc) {
+ COFFSymbolRef symRef = dc->getCOFFSymbol();
----------------
If `dc` will only be used in the `if`, it's preferred to declare the variable inside the if condition.
================
Comment at: lld/COFF/Writer.cpp:1220
+ }
d->writtenToSymtab = true;
----------------
Please keep this grouped with the check, so it's clear that it's one operation to ensure that each symbol is written at most once.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113866/new/
https://reviews.llvm.org/D113866
More information about the llvm-commits
mailing list