We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a3187a commit dbbb378Copy full SHA for dbbb378
Sources/LLVM/IntType.swift
@@ -52,7 +52,7 @@ public struct IntType: IRType {
52
/// type's bit width. Defaults to `false`.
53
public func constant<IntTy: UnsignedInteger>(_ value: IntTy, signExtend: Bool = false) -> Constant<Unsigned> {
54
return Constant(llvm: LLVMConstInt(asLLVM(),
55
- value.toUIntMax(),
+ UInt64(value),
56
signExtend.llvm))
57
}
58
@@ -63,7 +63,7 @@ public struct IntType: IRType {
63
64
public func constant<IntTy: SignedInteger>(_ value: IntTy, signExtend: Bool = false) -> Constant<Signed> {
65
66
- UInt64(bitPattern: value.toIntMax()),
+ UInt64(bitPattern: Int64(value)),
67
68
69
0 commit comments