Skip to content

Commit 1e142d0

Browse files
author
Amritpan Kaur
committed
[ConstraintGraph] Make Changes member types public and create accessor for Active Scope starting index for use in printing.
1 parent 935904d commit 1e142d0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

include/swift/Sema/ConstraintGraph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ class ConstraintGraph {
458458
/// Each change can be undone (once, and in reverse order) by calling the
459459
/// undo() method.
460460
class Change {
461+
public:
461462
/// The kind of change.
462463
ChangeKind Kind;
463464

@@ -482,7 +483,6 @@ class ConstraintGraph {
482483
} Binding;
483484
};
484485

485-
public:
486486
Change() : Kind(ChangeKind::AddedTypeVariable), TypeVar(nullptr) { }
487487

488488
/// Create a change that added a type variable.

include/swift/Sema/ConstraintGraphScope.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ class ConstraintGraphScope {
5050
public:
5151
explicit ConstraintGraphScope(ConstraintGraph &CG);
5252
~ConstraintGraphScope();
53+
54+
/// Get number of changes recorded at the start of the current active scope.
55+
unsigned getStartIdx() {
56+
return NumChanges;
57+
}
5358
};
5459

5560
} // end namespace constraints

0 commit comments

Comments
 (0)