mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Swift SIL: make BasicBlock Equatable
This commit is contained in:
@@ -14,7 +14,7 @@ import Basic
|
||||
import SILBridging
|
||||
|
||||
@_semantics("arc.immortal")
|
||||
final public class BasicBlock : CustomStringConvertible, HasShortDescription {
|
||||
final public class BasicBlock : CustomStringConvertible, HasShortDescription, Equatable {
|
||||
public var next: BasicBlock? { bridged.getNext().block }
|
||||
public var previous: BasicBlock? { bridged.getPrevious().block }
|
||||
|
||||
@@ -65,12 +65,11 @@ final public class BasicBlock : CustomStringConvertible, HasShortDescription {
|
||||
|
||||
public var name: String { "bb\(index)" }
|
||||
|
||||
public static func == (lhs: BasicBlock, rhs: BasicBlock) -> Bool { lhs === rhs }
|
||||
|
||||
public var bridged: BridgedBasicBlock { BridgedBasicBlock(SwiftObject(self)) }
|
||||
}
|
||||
|
||||
public func == (lhs: BasicBlock, rhs: BasicBlock) -> Bool { lhs === rhs }
|
||||
public func != (lhs: BasicBlock, rhs: BasicBlock) -> Bool { lhs !== rhs }
|
||||
|
||||
/// The list of instructions in a BasicBlock.
|
||||
///
|
||||
/// It's allowed to delete the current, next or any other instructions while
|
||||
|
||||
Reference in New Issue
Block a user