File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
SwiftCompilerSources/Sources/Optimizer/Utilities Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 18
18
19
19
import SIL
20
20
21
+ private let verbose = false
22
+
23
+ private func log( _ message: @autoclosure ( ) -> String ) {
24
+ if verbose {
25
+ print ( " ### \( message ( ) ) " )
26
+ }
27
+ }
28
+
21
29
/// Return true if any use in `value`s forward-extend lifetime has
22
30
/// .pointerEscape operand ownership.
23
31
///
@@ -370,6 +378,7 @@ struct NonEscapingClosureDefUseWalker {
370
378
if operand. instruction. isIncidentalUse {
371
379
return . continueWalk
372
380
}
381
+ log ( " >>> Unexpected closure use \( operand) " )
373
382
// Escaping or unexpected closure use. Expected escaping uses include ReturnInst with a lifetime-dependent result.
374
383
//
375
384
// TODO: Check in the SIL verifier that all uses are expected.
You can’t perform that action at this time.
0 commit comments