[Test] Ensourced visit-inner-adjacent-phis.

Moved the test next to the code it calls.
This commit is contained in:
Nate Chandler
2023-06-30 11:19:59 -07:00
parent bddc946574
commit a3db694af2
2 changed files with 18 additions and 16 deletions

View File

@@ -2173,6 +2173,24 @@ bool swift::visitInnerAdjacentPhis(SILArgument *phi,
return true;
}
namespace swift::test {
// Arguments:
// - SILValue: phi
// Dumps:
// - function
// - the adjacent phis
static FunctionTest VisitInnerAdjacentPhisTest(
"visit-inner-adjacent-phis",
[](auto &function, auto &arguments, auto &test) {
function.dump();
visitInnerAdjacentPhis(cast<SILPhiArgument>(arguments.takeValue()),
[](auto *argument) -> bool {
argument->dump();
return true;
});
});
} // end namespace swift::test
void swift::visitTransitiveEndBorrows(
SILValue value,
function_ref<void(EndBorrowInst *)> visitEndBorrow) {