[lld] 0940cd1 - [ELF] --symbol-ordering-file: use getLocalSymbols. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 5 02:06:34 PST 2022
Author: Fangrui Song
Date: 2022-01-05T02:06:31-08:00
New Revision: 0940cd18f2edc1776d98ea1655d32d82f50b063c
URL: https://github.com/llvm/llvm-project/commit/0940cd18f2edc1776d98ea1655d32d82f50b063c
DIFF: https://github.com/llvm/llvm-project/commit/0940cd18f2edc1776d98ea1655d32d82f50b063c.diff
LOG: [ELF] --symbol-ordering-file: use getLocalSymbols. NFC
Added:
Modified:
lld/ELF/Writer.cpp
Removed:
################################################################################
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index cf346808110b..6527493f1b1f 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -1316,11 +1316,8 @@ static DenseMap<const InputSectionBase *, int> buildSectionOrder() {
addSym(*sym);
for (ELFFileBase *file : objectFiles)
- for (Symbol *sym : file->getSymbols()) {
- if (!sym->isLocal())
- break;
+ for (Symbol *sym : file->getLocalSymbols())
addSym(*sym);
- }
if (config->warnSymbolOrdering)
for (auto orderEntry : symbolOrder)
More information about the llvm-commits
mailing list