Skip to content

Commit 6416640

Browse files
committed
[Sema] Support dumping of ConstraintLocatorBuilder
1 parent 5f47252 commit 6416640

File tree

2 files changed

+364
-321
lines changed

2 files changed

+364
-321
lines changed

include/swift/Sema/ConstraintLocator.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ class ConstraintLocator : public llvm::FoldingSetNode {
191191
bool isClosureResult() const {
192192
return getKind() == PathElementKind::ClosureResult;
193193
}
194+
195+
void dump(raw_ostream &out) const LLVM_ATTRIBUTE_USED;
196+
SWIFT_DEBUG_DUMP {
197+
dump(llvm::errs());
198+
}
194199
};
195200

196201
/// Return the summary flags for an entire path.
@@ -1256,6 +1261,12 @@ class ConstraintLocatorBuilder {
12561261

12571262
return None;
12581263
}
1264+
1265+
/// Produce a debugging dump of this locator.
1266+
SWIFT_DEBUG_DUMPER(dump(SourceManager *SM));
1267+
SWIFT_DEBUG_DUMPER(dump(ConstraintSystem *CS));
1268+
1269+
void dump(SourceManager *SM, raw_ostream &OS) const LLVM_ATTRIBUTE_USED;
12591270
};
12601271

12611272
} // end namespace constraints

0 commit comments

Comments
 (0)