[PATCH] D42475: [ELF] Add warnings for various symbols that cannot be ordered
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 19:11:32 PST 2018
ruiu added inline comments.
================
Comment at: ELF/Writer.cpp:1036-1038
+ bool Inserted = SymbolOrder.insert({S, {Priority++, false}}).second;
+ if (Config->WarnSymbolOrdering && !Inserted)
+ warn("symbol ordering file: symbol '" + S + "' specified multiple times");
----------------
Actually I'd do this in the driver so that we can make the writer focus on writing.
================
Comment at: ELF/Writer.cpp:1050
+
+ if (Config->WarnSymbolOrdering)
+ if (Sym->isUndefined())
----------------
For a multi-line if, please add {}.
================
Comment at: ELF/Writer.cpp:1071
+
+ if (Config->WarnSymbolOrdering)
+ for (auto OrderEntry : SymbolOrder) {
----------------
I'd move this to the driver as well.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D42475
More information about the llvm-commits
mailing list