[PATCH] D59311: [ELF] Dump symbols ordered by profiled guided section layout to file.

Tiancong Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 15:28:41 PDT 2019


tcwang marked an inline comment as not done.
tcwang added inline comments.


================
Comment at: lld/ELF/CallGraphSort.cpp:244
+        for (Symbol *Sym: Sections[SecIndex]->File->getSymbols())
+          if (!Sym->getName().empty())
+            if (auto *D = dyn_cast<Defined>(Sym))
----------------
ruiu wrote:
> So I think that checking name is fragile. What do you actually want to skip by doing this?
Because without this checking, I can get two symbols in the file that both match section. One of them is empty name. I wanted to use this filter out that symbol. Plus the goal of this part is to find out a symbol name from the file that is in the section. So empty-named symbols should be ignored?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59311/new/

https://reviews.llvm.org/D59311





More information about the llvm-commits mailing list