Skip to content

Commit

Permalink
ir.InstFreeze implements Operands
Browse files Browse the repository at this point in the history
  • Loading branch information
dannypsnl committed Aug 26, 2021
1 parent bf083a7 commit 5444acf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ir/inst_other.go
Expand Up @@ -331,6 +331,10 @@ type InstFreeze struct {
Metadata
}

func (inst *InstFreeze) Operands() []value.Value {
return []value.Value{inst.X}
}

// NewInstFreeze returns a new freeze instruction based on the given
// operand.
func NewInstFreeze(x value.Value) *InstFreeze {
Expand Down
1 change: 1 addition & 0 deletions ir/ir_test.go
Expand Up @@ -100,6 +100,7 @@ var (
_ Instruction = (*InstBitCast)(nil)
_ Instruction = (*InstAddrSpaceCast)(nil)
// Other instructions.
_ Instruction = (*InstFreeze)(nil)
_ Instruction = (*InstFNeg)(nil)
_ Instruction = (*InstICmp)(nil)
_ Instruction = (*InstFCmp)(nil)
Expand Down

0 comments on commit 5444acf

Please sign in to comment.