[PATCH] D18959: [lld] Implement --dynamic-list
Adhemerval Zanella via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 12 13:24:08 PDT 2016
zatrazz added inline comments.
================
Comment at: ELF/Writer.cpp:1124
@@ -1114,3 +1123,3 @@
std::vector<DefinedCommon *> CommonSymbols;
- for (auto &P : Symtab.getSymbols()) {
+ for (auto &P : SymtabSymbols) {
SymbolBody *Body = P.second->Body;
----------------
ruiu wrote:
> zatrazz wrote:
> > ruiu wrote:
> > > Why did you change this?
> > Because the list is already being copies above to be used in the dynamic list processing. Do we really need to get the mapvector again?
> I'm sorry but I don't get what you mean. SymtabSymbols is used only once here, so this seems to be just defining a redundant temporary variable and that makes a copy of the mapvector. Am I missing something?
My mistake, I notice I am using the Symtab::find method instead. I will change it back.
http://reviews.llvm.org/D18959
More information about the llvm-commits
mailing list