File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public struct IntType: IRType {
42
42
/// type's bit width. Defaults to `false`.
43
43
public func constant< IntTy: UnsignedInteger > ( _ value: IntTy , signExtend: Bool = false ) -> Constant < Unsigned > {
44
44
return Constant ( llvm: LLVMConstInt ( asLLVM ( ) ,
45
- unsafeBitCast ( value. toIntMax ( ) , to : UInt64 . self ) ,
45
+ UInt64 ( bitPattern : value. toIntMax ( ) ) ,
46
46
signExtend. llvm) )
47
47
}
48
48
@@ -53,7 +53,7 @@ public struct IntType: IRType {
53
53
/// type's bit width. Defaults to `false`.
54
54
public func constant< IntTy: SignedInteger > ( _ value: IntTy , signExtend: Bool = false ) -> Constant < Signed > {
55
55
return Constant ( llvm: LLVMConstInt ( asLLVM ( ) ,
56
- unsafeBitCast ( value. toIntMax ( ) , to : UInt64 . self ) ,
56
+ UInt64 ( bitPattern : value. toIntMax ( ) ) ,
57
57
signExtend. llvm) )
58
58
}
59
59
You can’t perform that action at this time.
0 commit comments