compiler/interface: fix LLVM context for boolean variable

Apparently the given code path was never properly tested.
This commit is contained in:
Ayke van Laethem
2019-01-11 20:19:00 +01:00
parent 072eb590a6
commit 54baf48266
+1 -1
View File
@@ -444,7 +444,7 @@ func (p *lowerInterfacesPass) run() {
var commaOk llvm.Value
if t.countMakeInterfaces == 0 {
// impossible type assert: optimize accordingly
commaOk = llvm.ConstInt(llvm.Int1Type(), 0, false)
commaOk = llvm.ConstInt(p.ctx.Int1Type(), 0, false)
} else {
// regular type assert
p.builder.SetInsertPointBefore(use)