summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2019-02-27 10:14:58 +0000
committerHans Wennborg <hans@hanshq.net>2019-02-27 10:14:58 +0000
commit992552edc2c501391dfde659c13e224ab168021d (patch)
tree84aab07af14c0eec225e43b28a8d1aa4396d2690
parentAdd note on libFuzzer for Windows to release notes (diff)
downloadllvm-project-992552edc2c501391dfde659c13e224ab168021d.tar.gz
llvm-project-992552edc2c501391dfde659c13e224ab168021d.tar.bz2
llvm-project-992552edc2c501391dfde659c13e224ab168021d.zip
Merging r354207:
------------------------------------------------------------------------ r354207 | whitequark | 2019-02-16 23:33:10 +0100 (Sat, 16 Feb 2019) | 16 lines [bindings/go] Fix building on 32-bit systems (ARM etc.) Summary: The patch in https://reviews.llvm.org/D53883 (by me) fails to build on 32-bit systems like ARM. Fix the array size to be less ridiculously large. 2<<20 should still be enough for all practical purposes. Bug: https://bugs.llvm.org/show_bug.cgi?id=40426 Reviewers: whitequark, pcc Reviewed By: whitequark Subscribers: javed.absar, kristof.beyls, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58030 ------------------------------------------------------------------------ llvm-svn: 354956
-rw-r--r--llvm/bindings/go/llvm/ir.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/bindings/go/llvm/ir.go b/llvm/bindings/go/llvm/ir.go
index 1872a2ffe510..3e85137a751a 100644
--- a/llvm/bindings/go/llvm/ir.go
+++ b/llvm/bindings/go/llvm/ir.go
@@ -1263,7 +1263,7 @@ func (v Value) Indices() []uint32 {
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])