update llvm

This commit is contained in:
xushiwei
2024-05-19 16:42:22 +08:00
parent 39268c681f
commit 55365b1d17
7 changed files with 44 additions and 38 deletions

View File

@@ -151,7 +151,7 @@ func (b Builder) checkIndex(idx Expr) Expr {
prog := b.Prog
if needsNegativeCheck(idx) {
zero := llvm.ConstInt(idx.ll, 0, false)
check := Expr{b.impl.CreateICmp(llvm.IntSLT, idx.impl, zero, ""), prog.Bool()}
check := Expr{llvm.CreateICmp(b.impl, llvm.IntSLT, idx.impl, zero), prog.Bool()}
b.InlineCall(b.Pkg.rtFunc("AssertIndexRange"), check)
}
typ := prog.Uint()