mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-21 21:09:02 +00:00
Remove unnecessary check for nil in parseExpr
This commit is contained in:
@@ -1120,7 +1120,6 @@ func (c *Compiler) parseCall(frame *Frame, instr *ssa.CallCommon, parentHandle l
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Compiler) parseExpr(frame *Frame, expr ssa.Value) (llvm.Value, error) {
|
func (c *Compiler) parseExpr(frame *Frame, expr ssa.Value) (llvm.Value, error) {
|
||||||
if frame != nil {
|
|
||||||
if value, ok := frame.locals[expr]; ok {
|
if value, ok := frame.locals[expr]; ok {
|
||||||
// Value is a local variable that has already been computed.
|
// Value is a local variable that has already been computed.
|
||||||
if value.IsNil() {
|
if value.IsNil() {
|
||||||
@@ -1128,7 +1127,6 @@ func (c *Compiler) parseExpr(frame *Frame, expr ssa.Value) (llvm.Value, error) {
|
|||||||
}
|
}
|
||||||
return value, nil
|
return value, nil
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
switch expr := expr.(type) {
|
switch expr := expr.(type) {
|
||||||
case *ssa.Alloc:
|
case *ssa.Alloc:
|
||||||
|
|||||||
Reference in New Issue
Block a user