Swift SIL: let var UnaryInstruction.operand return an Operand and not a Value

To avoid confusion. Instead add specific getters for unary instructions with dedicated names.

NFC
This commit is contained in:
Erik Eckstein
2023-02-20 20:52:57 +01:00
parent 7018c5575e
commit f1095556c9
17 changed files with 148 additions and 98 deletions

View File

@@ -14,7 +14,7 @@ import SIL
extension StructExtractInst : OnoneSimplifyable {
func simplify(_ context: SimplifyContext) {
guard let structInst = operand as? StructInst else {
guard let structInst = self.struct as? StructInst else {
return
}
context.tryReplaceRedundantInstructionPair(first: structInst, second: self,