[llvm-branch-commits] [llvm-branch] r354956 - Merging r354207:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Feb 27 02:14:58 PST 2019


Author: hans
Date: Wed Feb 27 02:14:58 2019
New Revision: 354956

URL: http://llvm.org/viewvc/llvm-project?rev=354956&view=rev
Log:
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
------------------------------------------------------------------------

Modified:
    llvm/branches/release_80/   (props changed)
    llvm/branches/release_80/bindings/go/llvm/ir.go

Propchange: llvm/branches/release_80/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 27 02:14:58 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,351322,351325,351344-351345,351349,351351,351370,351381,351387,351421,351426,351436,351475,351485,351753-351754,351765,351910,351930,351932,352034,352204,352246,352374,352555,352607-352608,352707,352714,352770,352886,352889,352892,352895,352908,352917,352935,352945,353015,353061,353082,353138,353141,353155,353213,353218,353304,353308,353334,353367,353374,353383,353463,353480,353489,353551,353733,353758,353809,353907,354034,354117,354128,354131,354144,354497,354733,354756,354764
+/llvm/trunk:155241,351322,351325,351344-351345,351349,351351,351370,351381,351387,351421,351426,351436,351475,351485,351753-351754,351765,351910,351930,351932,352034,352204,352246,352374,352555,352607-352608,352707,352714,352770,352886,352889,352892,352895,352908,352917,352935,352945,353015,353061,353082,353138,353141,353155,353213,353218,353304,353308,353334,353367,353374,353383,353463,353480,353489,353551,353733,353758,353809,353907,354034,354117,354128,354131,354144,354207,354497,354733,354756,354764

Modified: llvm/branches/release_80/bindings/go/llvm/ir.go
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_80/bindings/go/llvm/ir.go?rev=354956&r1=354955&r2=354956&view=diff
==============================================================================
--- llvm/branches/release_80/bindings/go/llvm/ir.go (original)
+++ llvm/branches/release_80/bindings/go/llvm/ir.go Wed Feb 27 02:14:58 2019
@@ -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])




More information about the llvm-branch-commits mailing list