[PATCH] D58030: [bindings/go] Fix building on 32-bit systems (ARM etc.)
whitequark via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 16 14:35:16 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL354207: [bindings/go] Fix building on 32-bit systems (ARM etc.) (authored by whitequark, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D58030?vs=186199&id=187147#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58030/new/
https://reviews.llvm.org/D58030
Files:
llvm/trunk/bindings/go/llvm/ir.go
Index: llvm/trunk/bindings/go/llvm/ir.go
===================================================================
--- llvm/trunk/bindings/go/llvm/ir.go
+++ llvm/trunk/bindings/go/llvm/ir.go
@@ -1262,7 +1262,7 @@
num := C.LLVMGetNumIndices(v.C)
indicesPtr := C.LLVMGetIndices(v.C)
// https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices
- rawIndices := (*[1 << 30]C.uint)(unsafe.Pointer(indicesPtr))[:num:num]
+ rawIndices := (*[1 << 20]C.uint)(unsafe.Pointer(indicesPtr))[:num:num]
indices := make([]uint32, num)
for i := range indices {
indices[i] = uint32(rawIndices[i])
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58030.187147.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190216/6e9acda1/attachment.bin>
More information about the llvm-commits
mailing list