mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Swift SIL: rename parent accessors to parentX, e.g. Instruction.parentBlock
It makes it easier to read
This commit is contained in:
@@ -50,14 +50,14 @@ struct InstructionRange : CustomStringConvertible, NoReflectionChildren {
|
||||
|
||||
init(begin beginInst: Instruction, _ context: PassContext) {
|
||||
self.begin = beginInst
|
||||
self.blockRange = BasicBlockRange(begin: beginInst.block, context)
|
||||
self.blockRange = BasicBlockRange(begin: beginInst.parentBlock, context)
|
||||
self.insertedInsts = InstructionSet(context)
|
||||
}
|
||||
|
||||
/// Insert a potential end instruction.
|
||||
mutating func insert(_ inst: Instruction) {
|
||||
insertedInsts.insert(inst)
|
||||
blockRange.insert(inst.block)
|
||||
blockRange.insert(inst.parentBlock)
|
||||
}
|
||||
|
||||
/// Insert a sequence of potential end instructions.
|
||||
@@ -69,7 +69,7 @@ struct InstructionRange : CustomStringConvertible, NoReflectionChildren {
|
||||
|
||||
/// Returns true if the exclusive range contains `inst`.
|
||||
func contains(_ inst: Instruction) -> Bool {
|
||||
let block = inst.block
|
||||
let block = inst.parentBlock
|
||||
if !blockRange.inclusiveRangeContains(block) { return false }
|
||||
var inRange = false
|
||||
if blockRange.contains(block) {
|
||||
|
||||
Reference in New Issue
Block a user