diff options
author | Ayke van Laethem <[email protected]> | 2022-09-20 23:26:49 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2022-10-19 22:23:19 +0200 |
commit | 09ec846c9f3204837ae0695077f6e1359c545fe9 (patch) | |
tree | 127038e48ef68270bc4bafbc16c700328a13d8c0 /compiler/asserts.go | |
parent | f57cffce2d47f7c2b3c9ec1ddd1f077f0830d435 (diff) | |
download | tinygo-09ec846c9f3204837ae0695077f6e1359c545fe9.tar.gz tinygo-09ec846c9f3204837ae0695077f6e1359c545fe9.zip |
all: replace llvm.Const* calls with builder.Create* calls
A number of llvm.Const* functions (in particular extractvalue and
insertvalue) were removed in LLVM 15, so we have to use a builder
instead. This builder will create the same constant values, it simply
uses a different API.
Diffstat (limited to 'compiler/asserts.go')
-rw-r--r-- | compiler/asserts.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/asserts.go b/compiler/asserts.go index 8d9efdde7..2a5265e93 100644 --- a/compiler/asserts.go +++ b/compiler/asserts.go @@ -145,7 +145,7 @@ func (b *builder) createChanBoundsCheck(elementSize uint64, bufSize llvm.Value, } // Make the maxBufSize actually the maximum allowed value (in number of // elements in the channel buffer). - maxBufSize = llvm.ConstUDiv(maxBufSize, llvm.ConstInt(b.uintptrType, elementSize, false)) + maxBufSize = b.CreateUDiv(maxBufSize, llvm.ConstInt(b.uintptrType, elementSize, false), "") // Make sure maxBufSize has the same type as bufSize. if maxBufSize.Type() != bufSize.Type() { |