aboutsummaryrefslogtreecommitdiffhomepage
path: root/compiler/channel.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2019-09-15 16:42:31 +0200
committerRon Evans <[email protected]>2019-09-15 19:09:10 +0200
commit10ed3decb076c88077ccd849029357e1c2c33f7c (patch)
tree8c78d0c16530e61ff3315f1051f9315ea915d1fa /compiler/channel.go
parent8d959b7c636a392046558046e9b423efb2c288bb (diff)
downloadtinygo-10ed3decb076c88077ccd849029357e1c2c33f7c.tar.gz
tinygo-10ed3decb076c88077ccd849029357e1c2c33f7c.zip
compiler: rename getZeroValue to llvm.ConstNull
It does the same thing but should be more complete, and it probably is faster as well (just one CGo call instead of several).
Diffstat (limited to 'compiler/channel.go')
-rw-r--r--compiler/channel.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/channel.go b/compiler/channel.go
index e04d58969..55fb6920d 100644
--- a/compiler/channel.go
+++ b/compiler/channel.go
@@ -124,7 +124,7 @@ func (c *Compiler) emitSelect(frame *Frame, expr *ssa.Select) llvm.Value {
chanSelectStateType := c.getLLVMRuntimeType("chanSelectState")
for _, state := range expr.States {
ch := c.getValue(frame, state.Chan)
- selectState := c.getZeroValue(chanSelectStateType)
+ selectState := llvm.ConstNull(chanSelectStateType)
selectState = c.builder.CreateInsertValue(selectState, ch, 0, "")
switch state.Dir {
case types.RecvOnly: