[PATCH] D45850: [ELF] Read the call graph profile from object files.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 18 01:56:52 PDT 2018


grimar added inline comments.


================
Comment at: ELF/Driver.cpp:676
+  auto FindSection = [&](const Symbol *Sym) -> const InputSectionBase * {
+    warnUnorderableSymbol(Sym);
+    if (const auto *SymD = dyn_cast<Defined>(Sym))
----------------
Can you add a test to check this line?


================
Comment at: ELF/Driver.cpp:685
+    ArrayRef<Elf_CGProfile_Impl<ELFT>> CGProfile = Obj->CGProfile;
+    for (const Elf_CGProfile_Impl<ELFT> &CGPE : CGProfile) {
+      const InputSectionBase *FromSB =
----------------
`CGProfile` is used only once so I think you can just inline it:

`for (const Elf_CGProfile_Impl<ELFT> &CGPE : Obj->CGProfile)`


https://reviews.llvm.org/D45850





More information about the llvm-commits mailing list