Skip to content

Commit 556b083

Browse files
author
Alexander Yermolovich
committed
various comments
1 parent 16c93ba commit 556b083

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

bolt/lib/Core/DebugNames.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ std::optional<std::string> DWARF5AcceleratorTable::getName(
270270
if (!NameToUse.empty())
271271
NameIndexOffset = MainBinaryStrWriter.addString(Name);
272272
It.StrOffset = NameIndexOffset;
273-
// This the same hash function used in DWARF5AccelTableData.
273+
// This is the same hash function used in DWARF5AccelTableData.
274274
It.HashValue = caseFoldingDjbHash(Name);
275275
}
276276
return Name;
@@ -301,9 +301,8 @@ std::optional<BOLTDWARF5AccelTableData *> DWARF5AcceleratorTable::addEntry(
301301
}
302302
std::optional<uint64_t> ParentOffset =
303303
(Parent ? std::optional<uint64_t>(getEntryID(**Parent)) : std::nullopt);
304-
// This will be populated later in writeEntry.
305-
// This way only parent entries get tracked.
306-
// Keeping memory footprint down.
304+
// This will be only populated in writeEntry, in order to keep only the parent
305+
// entries, and keep the footprint down.
307306
if (ParentOffset)
308307
EntryRelativeOffsets.insert({*ParentOffset, 0});
309308
bool IsParentRoot = false;
@@ -387,7 +386,7 @@ DWARF5AcceleratorTable::addAccelTableEntry(
387386
if (!canProcess(Unit, Die, NameToUse, false))
388387
return std::nullopt;
389388

390-
// Addes a Unit to either CU, LocalTU or ForeignTU list the first time we
389+
// Adds a Unit to either CU, LocalTU or ForeignTU list the first time we
391390
// encounter it.
392391
// Invoking it here so that we don't add Units that don't have any entries.
393392
if (&Unit != CurrentUnit) {
@@ -414,10 +413,10 @@ DWARF5AcceleratorTable::addAccelTableEntry(
414413

415414
// The DIE doesn't have DW_AT_name or DW_AT_linkage_name, so we need to see if
416415
// we can follow other attributes to find them. For the purposes of
417-
// determining whether a debugging information entry has a particular
418-
// attribute (such as DW_AT_name), if debugging information entry A has a
416+
// determining whether a debug information entry has a particular
417+
// attribute (such as DW_AT_name), if debug information entry A has a
419418
// DW_AT_specification or DW_AT_abstract_origin attribute pointing to another
420-
// debugging information entry B, any attributes of B are considered to be
419+
// debug information entry B, any attributes of B are considered to be
421420
// part of A.
422421
if (std::optional<BOLTDWARF5AccelTableData *> Entry = processReferencedDie(
423422
Unit, Die, DWOID, Parent, NameToUse, NumberParentsInChain,

0 commit comments

Comments
 (0)