@@ -131,7 +131,7 @@ func computeInteriorLiveness(for definingValue: Value,
131
131
///
132
132
/// TODO: Verify that pointerEscape is only called for live ranges in which
133
133
/// `findPointerEscape()` returns true.
134
- protocol AddressUseVisitor {
134
+ protocol AddressLifetimeDefUseWalker {
135
135
var _context : Context { get }
136
136
137
137
/// Start a def-use walk from and address.
@@ -190,7 +190,7 @@ protocol AddressUseVisitor {
190
190
mutating func handle( borrow: LoadBorrowInst ) -> WalkResult
191
191
}
192
192
193
- extension AddressUseVisitor {
193
+ extension AddressLifetimeDefUseWalker {
194
194
mutating func projection( of address: Operand ) -> WalkResult {
195
195
return . continueWalk
196
196
}
@@ -651,7 +651,7 @@ extension OwnershipUseVisitor {
651
651
///
652
652
/// TODO: Change the operandOwnership of MarkDependenceInst base operand.
653
653
/// It should be a borrowing operand, not a pointer escape.
654
- struct InteriorUseWalker : OwnershipUseVisitor , AddressUseVisitor {
654
+ struct InteriorUseWalker : OwnershipUseVisitor , AddressLifetimeDefUseWalker {
655
655
let context : FunctionPassContext
656
656
var _context : Context { context }
657
657
@@ -1022,7 +1022,7 @@ let interiorLivenessTest = FunctionTest("interior_liveness_swift") {
1022
1022
}
1023
1023
1024
1024
// Print the uses of an address.
1025
- struct AddressUsePrinter : AddressUseVisitor {
1025
+ struct AddressLifetimeUsePrinter : AddressLifetimeDefUseWalker {
1026
1026
let _context : Context
1027
1027
1028
1028
mutating func leafUse( address: Operand ) -> WalkResult {
@@ -1053,6 +1053,6 @@ let addressUseTest = FunctionTest("address_use_test") {
1053
1053
assert ( address. type. isAddress)
1054
1054
print ( function)
1055
1055
print ( " Uses of address: \( address) " )
1056
- var printer = AddressUsePrinter ( _context: context)
1056
+ var printer = AddressLifetimeUsePrinter ( _context: context)
1057
1057
_ = printer. walkDownUses ( ofAddress: address)
1058
1058
}
0 commit comments