Skip to content

Commit

Permalink
Fix compilation for swift 5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
koliyo committed Oct 10, 2023
1 parent 3919e53 commit 792a941
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
5 changes: 2 additions & 3 deletions Sources/CodeGen/LLVM/FloatingPointPredicate.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Core
import LLVM

extension LLVM.FloatingPointPredicate {
extension FloatingPointPredicate {
public init(_ p: Core.FloatingPointPredicate) {
self = LLVM.FloatingPointPredicate(rawValue: p.rawValue)!
self = FloatingPointPredicate(rawValue: p.rawValue)!
}
}
5 changes: 2 additions & 3 deletions Sources/CodeGen/LLVM/IntegerPredicate.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Core
import LLVM

extension LLVM.IntegerPredicate {
extension IntegerPredicate {
public init(_ p: Core.IntegerPredicate) {
self = LLVM.IntegerPredicate(rawValue: p.rawValue)!
self = IntegerPredicate(rawValue: p.rawValue)!
}
}
9 changes: 4 additions & 5 deletions Sources/CodeGen/LLVM/OverflowBehavior.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import Core
import LLVM

extension LLVM.OverflowBehavior {
extension OverflowBehavior {
public init(_ ob: Core.OverflowBehavior) {
self = switch ob {
case .ignore: .ignore
case .nuw: .nuw
case .nsw: .nsw
case .ignore: OverflowBehavior.ignore
case .nuw: OverflowBehavior.nuw
case .nsw: OverflowBehavior.nsw
}
}
}

0 comments on commit 792a941

Please sign in to comment.