mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 11:13:27 +00:00
compiler/interface: fix LLVM context for boolean variable
Apparently the given code path was never properly tested.
This commit is contained in:
@@ -444,7 +444,7 @@ func (p *lowerInterfacesPass) run() {
|
|||||||
var commaOk llvm.Value
|
var commaOk llvm.Value
|
||||||
if t.countMakeInterfaces == 0 {
|
if t.countMakeInterfaces == 0 {
|
||||||
// impossible type assert: optimize accordingly
|
// impossible type assert: optimize accordingly
|
||||||
commaOk = llvm.ConstInt(llvm.Int1Type(), 0, false)
|
commaOk = llvm.ConstInt(p.ctx.Int1Type(), 0, false)
|
||||||
} else {
|
} else {
|
||||||
// regular type assert
|
// regular type assert
|
||||||
p.builder.SetInsertPointBefore(use)
|
p.builder.SetInsertPointBefore(use)
|
||||||
|
|||||||
Reference in New Issue
Block a user