From 8d205773720a3ac0356760de3e7f94dd026e7380 Mon Sep 17 00:00:00 2001 From: Cedric <14017092+douyixuan@users.noreply.github.com> Date: Wed, 28 Aug 2024 09:48:46 +0800 Subject: [PATCH] fix memset param type --- compiler/compiler/slice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/compiler/slice.go b/compiler/compiler/slice.go index f8fb5bc..721fa66 100644 --- a/compiler/compiler/slice.go +++ b/compiler/compiler/slice.go @@ -434,7 +434,7 @@ func (c *Compiler) compileInitializeSliceWithValues(itemType types.Type, initLen c.contextBlock.NewStore(cap32, capPtr) if len(values) == 0 { - dst := backingArrayPtr + dst := c.contextBlock.NewBitCast(backingArrayPtr, llvmTypes.I8Ptr) toset := constant.NewInt(llvmTypes.I32, 0) size := len32 c.contextBlock.NewCall(c.osFuncs.Memset.Value, dst, toset, size)