Skip to content

Commit 55b0373

Browse files
committed
[BuilderTransform] NFC: Print out a function to which builder is being applied
1 parent 8304e6c commit 55b0373

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Sema/BuilderTransform.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,6 +1661,14 @@ Optional<BraceStmt *> TypeChecker::applyResultBuilderBodyTransform(
16611661
// Build a constraint system in which we can check the body of the function.
16621662
ConstraintSystem cs(func, options);
16631663

1664+
if (cs.isDebugMode()) {
1665+
auto &log = llvm::errs();
1666+
1667+
log << "--- Applying result builder to function ---\n";
1668+
func->dump(log);
1669+
log << '\n';
1670+
}
1671+
16641672
if (auto result = cs.matchResultBuilder(
16651673
func, builderType, resultContextType, resultConstraintKind,
16661674
cs.getConstraintLocator(func->getBody()))) {

0 commit comments

Comments
 (0)