Skip to content

Commit 50faf51

Browse files
committed
clarify the meaning of EntryStorage.Entries and EntryStorage.Offsets
1 parent b983de3 commit 50faf51

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/include/llvm/CGData/StableFunctionMap.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,17 @@ struct StableFunctionMap {
8181
/// the offsets of corresponding serialized stable function entries, and a
8282
/// once flag for safe lazy loading in a multithreaded environment.
8383
struct EntryStorage {
84+
/// The actual storage of deserialized stable function entries. If the map
85+
/// is lazily loaded, this will be empty until the first access by the
86+
/// corresponding function hash.
8487
StableFunctionEntries Entries;
8588

8689
private:
90+
/// This is used to deserialize the entry lazily. Each element is the
91+
/// corresponding serialized stable function entry's offset in the memory
92+
/// buffer (StableFunctionMap::Buffer).
93+
/// The offsets are only populated when loading the map lazily, otherwise
94+
/// it is empty.
8795
SmallVector<uint64_t> Offsets;
8896
std::once_flag LazyLoadFlag;
8997
friend struct StableFunctionMap;

0 commit comments

Comments
 (0)