mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
Remove unnecessary check for nil in parseExpr
This commit is contained in:
@@ -1120,14 +1120,12 @@ func (c *Compiler) parseCall(frame *Frame, instr *ssa.CallCommon, parentHandle l
|
||||
}
|
||||
|
||||
func (c *Compiler) parseExpr(frame *Frame, expr ssa.Value) (llvm.Value, error) {
|
||||
if frame != nil {
|
||||
if value, ok := frame.locals[expr]; ok {
|
||||
// Value is a local variable that has already been computed.
|
||||
if value.IsNil() {
|
||||
return llvm.Value{}, errors.New("undefined local var (from cgo?)")
|
||||
}
|
||||
return value, nil
|
||||
if value, ok := frame.locals[expr]; ok {
|
||||
// Value is a local variable that has already been computed.
|
||||
if value.IsNil() {
|
||||
return llvm.Value{}, errors.New("undefined local var (from cgo?)")
|
||||
}
|
||||
return value, nil
|
||||
}
|
||||
|
||||
switch expr := expr.(type) {
|
||||
|
||||
Reference in New Issue
Block a user