Skip to content

Commit 840342b

Browse files
committed
Update some comments for expandTypeIntoLeafProjectionPaths in Projection.h
1 parent eba7853 commit 840342b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

include/swift/SIL/Projection.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,8 @@ class ProjectionPath {
430430

431431
/// Given the SILType Base, expand every leaf nodes in the type tree.
432432
/// Include the intermediate nodes if OnlyLeafNode is false.
433+
/// NOTE: this function returns a single empty projection path if the BaseType
434+
/// is a leaf node in the type tree.
433435
static void expandTypeIntoLeafProjectionPaths(SILType BaseType,
434436
SILModule *Mod,
435437
ProjectionPathList &P,

lib/SIL/Projection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ ProjectionPath::expandTypeIntoLeafProjectionPaths(SILType B, SILModule *Mod,
665665
continue;
666666
}
667667

668-
// This is NOT a leaf node, keep the intermediate nodes as well.
668+
// If OnlyLeafNode is false, keep the intermediate nodes as well.
669669
if (!OnlyLeafNode)
670670
Paths.push_back(std::move(PP.getValue()));
671671

0 commit comments

Comments
 (0)