From 792a941cd45aaac2bb00c9a1a526b4b2e49d8399 Mon Sep 17 00:00:00 2001 From: Nils Hjelte Date: Tue, 10 Oct 2023 19:31:15 +0200 Subject: [PATCH] Fix compilation for swift 5.8 --- Sources/CodeGen/LLVM/FloatingPointPredicate.swift | 5 ++--- Sources/CodeGen/LLVM/IntegerPredicate.swift | 5 ++--- Sources/CodeGen/LLVM/OverflowBehavior.swift | 9 ++++----- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Sources/CodeGen/LLVM/FloatingPointPredicate.swift b/Sources/CodeGen/LLVM/FloatingPointPredicate.swift index 2ace86de4..9eee010d5 100644 --- a/Sources/CodeGen/LLVM/FloatingPointPredicate.swift +++ b/Sources/CodeGen/LLVM/FloatingPointPredicate.swift @@ -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)! } } diff --git a/Sources/CodeGen/LLVM/IntegerPredicate.swift b/Sources/CodeGen/LLVM/IntegerPredicate.swift index 2cc1e8806..f3f950fb6 100644 --- a/Sources/CodeGen/LLVM/IntegerPredicate.swift +++ b/Sources/CodeGen/LLVM/IntegerPredicate.swift @@ -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)! } } diff --git a/Sources/CodeGen/LLVM/OverflowBehavior.swift b/Sources/CodeGen/LLVM/OverflowBehavior.swift index e565985b9..f5b67e952 100644 --- a/Sources/CodeGen/LLVM/OverflowBehavior.swift +++ b/Sources/CodeGen/LLVM/OverflowBehavior.swift @@ -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 } } }