Skip to content

Commit d04fbd0

Browse files
committed
Address review comments.
1 parent c429dd8 commit d04fbd0

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

llvm/tools/llvm-readobj/ELFDumper.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -451,13 +451,8 @@ template <typename ELFT> class ELFDumper : public ObjDumper {
451451
// information.
452452
SmallVector<FunctionCallgraphInfo, 16> FuncCGInfos;
453453

454-
// // Callgraph - 64 bit type id mapped to entry PC addresses of functions
455-
// which
456-
// // are of the given type id.
457-
// MapVector<uint64_t, SmallVector<typename ELFT::uint>> TypeIdToIndirTargets;
458-
459-
// Callgraph - Read callgraph section and process its contents to populate
460-
// Callgraph related data structures which will be used to dump callgraph
454+
// Read the .llvm.callgraph section and process its contents to populate
455+
// call graph related data structures which will be used to dump call graph
461456
// info. Returns false if there is no .llvm.callgraph section in the input
462457
// file.
463458
bool processCallGraphSection();
@@ -469,7 +464,7 @@ template <typename ELFT> class ELFDumper : public ObjDumper {
469464
mutable SmallVector<std::optional<VersionEntry>, 0> VersionMap;
470465

471466
protected:
472-
std::string getFunctionNames(uint64_t FuncAddr) {
467+
std::string getFunctionNamesString(uint64_t FuncAddr) {
473468
SmallVector<uint32_t> FuncSymIndexes =
474469
this->getSymbolIndexesForFunctionAddress(FuncAddr, std::nullopt);
475470
if (FuncSymIndexes.empty())
@@ -5542,7 +5537,7 @@ template <class ELFT> void GNUELFDumper<ELFT>::printCallGraphInfo() {
55425537

55435538
auto PrintFunctionInfo = [&](uint64_t FuncEntryPC) {
55445539
if (this->Obj.getHeader().e_type != ELF::ET_REL) {
5545-
std::string FuncSymName = this->getFunctionNames(FuncEntryPC);
5540+
std::string FuncSymName = this->getFunctionNamesString(FuncEntryPC);
55465541
PrintFunc(FuncEntryPC, FuncSymName, OS);
55475542
return;
55485543
}
@@ -8453,7 +8448,7 @@ template <class ELFT> void LLVMELFDumper<ELFT>::printCallGraphInfo() {
84538448

84548449
auto PrintFunctionInfo = [&](uint64_t FuncEntryPC) {
84558450
if (this->Obj.getHeader().e_type != ELF::ET_REL) {
8456-
std::string FuncSymName = this->getFunctionNames(FuncEntryPC);
8451+
std::string FuncSymName = this->getFunctionNamesString(FuncEntryPC);
84578452
PrintFunc(FuncEntryPC, FuncSymName, W);
84588453
return;
84598454
}

0 commit comments

Comments
 (0)