Skip to content

Commit

Permalink
fix memset param type
Browse files Browse the repository at this point in the history
  • Loading branch information
douyixuan committed Aug 28, 2024
1 parent 8783b20 commit 8d20577
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/compiler/slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8d20577

Please sign in to comment.