Skip to content

Commit

Permalink
termCallBr missing operands
Browse files Browse the repository at this point in the history
  • Loading branch information
dannypsnl committed Aug 21, 2021
1 parent 9363750 commit 2a7b338
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions ir/ir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ var (
_ Terminator = (*TermRet)(nil)
_ Terminator = (*TermBr)(nil)
_ Terminator = (*TermCondBr)(nil)
_ Terminator = (*TermCallBr)(nil)
_ Terminator = (*TermSwitch)(nil)
_ Terminator = (*TermIndirectBr)(nil)
_ Terminator = (*TermInvoke)(nil)
Expand Down
4 changes: 4 additions & 0 deletions ir/terminator.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,10 @@ type TermCallBr struct {
Metadata
}

func (term *TermCallBr) Operands() []value.Value {
return append(append(append([]value.Value{term.Callee}, term.Args...), term.NormalRetTarget), term.OtherRetTargets...)
}

// NewCallBr returns a new callbr terminator based on the given callee, function
// arguments and control flow return points for normal and exceptional
// execution.
Expand Down

0 comments on commit 2a7b338

Please sign in to comment.