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

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 16:21:00 PDT 2019


ruiu added inline comments.


================
Comment at: lld/ELF/CallGraphSort.cpp:243
+        // and find out a Defined symbol with name that is within the section.
+        for (auto* Symbol: Sections[SecIndex]->File->getSymbols())
+          if (!Symbol->getName().empty())
----------------
tcwang wrote:
> ruiu wrote:
> > We do not use `auto` unless its type is obvious from right-hand side.
> > 
> > `auto* Foo` -> `auto *Foo`
> Ok. I will not use auto in this case. Thanks!
Let's avoid using the same name for a variable and a class. I believe you have shadowed `class Symbol` by a variable `Symbol`. That's confusing. A common variable name is `Sym`.


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