diff --git a/transform/allocs.go b/transform/allocs.go index b1f5ea35..35fa1b0b 100644 --- a/transform/allocs.go +++ b/transform/allocs.go @@ -41,7 +41,7 @@ func OptimizeAllocs(mod llvm.Module, printAllocs *regexp.Regexp, logger func(tok for _, heapalloc := range getUses(allocator) { logAllocs := printAllocs != nil && printAllocs.MatchString(heapalloc.InstructionParent().Parent().Name()) - if heapalloc.Operand(0).IsAConstant().IsNil() { + if heapalloc.Operand(0).IsAConstantInt().IsNil() { // Do not allocate variable length arrays on the stack. if logAllocs { logAlloc(logger, heapalloc, "size is not constant")