Skip to content

Commit dbbb378

Browse files
committed
to[U]IntMax is deprecated
1 parent 2a3187a commit dbbb378

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/LLVM/IntType.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public struct IntType: IRType {
5252
/// type's bit width. Defaults to `false`.
5353
public func constant<IntTy: UnsignedInteger>(_ value: IntTy, signExtend: Bool = false) -> Constant<Unsigned> {
5454
return Constant(llvm: LLVMConstInt(asLLVM(),
55-
value.toUIntMax(),
55+
UInt64(value),
5656
signExtend.llvm))
5757
}
5858

@@ -63,7 +63,7 @@ public struct IntType: IRType {
6363
/// type's bit width. Defaults to `false`.
6464
public func constant<IntTy: SignedInteger>(_ value: IntTy, signExtend: Bool = false) -> Constant<Signed> {
6565
return Constant(llvm: LLVMConstInt(asLLVM(),
66-
UInt64(bitPattern: value.toIntMax()),
66+
UInt64(bitPattern: Int64(value)),
6767
signExtend.llvm))
6868
}
6969

0 commit comments

Comments
 (0)