diff options
Diffstat (limited to 'compiler/channel.go')
-rw-r--r-- | compiler/channel.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/channel.go b/compiler/channel.go index b5bcd95b9..8098ea99a 100644 --- a/compiler/channel.go +++ b/compiler/channel.go @@ -12,7 +12,7 @@ import ( // emitMakeChan returns a new channel value for the given channel type. func (c *Compiler) emitMakeChan(expr *ssa.MakeChan) (llvm.Value, error) { - chanType := c.mod.GetTypeByName("runtime.channel") + chanType := c.getLLVMType(c.getRuntimeType("channel")) size := c.targetData.TypeAllocSize(chanType) sizeValue := llvm.ConstInt(c.uintptrType, size, false) ptr := c.createRuntimeCall("alloc", []llvm.Value{sizeValue}, "chan.alloc") |