From b8a81f661065fa4660c865dec194ccbf59e02a98 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 | 2 +- Sources/CodeGen/LLVM/IntegerPredicate.swift | 2 +- Sources/CodeGen/LLVM/OverflowBehavior.swift | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Sources/CodeGen/LLVM/FloatingPointPredicate.swift b/Sources/CodeGen/LLVM/FloatingPointPredicate.swift index 2ace86de4..06c3c38b6 100644 --- a/Sources/CodeGen/LLVM/FloatingPointPredicate.swift +++ b/Sources/CodeGen/LLVM/FloatingPointPredicate.swift @@ -1,5 +1,5 @@ -import Core import LLVM +import Core extension LLVM.FloatingPointPredicate { public init(_ p: Core.FloatingPointPredicate) { diff --git a/Sources/CodeGen/LLVM/IntegerPredicate.swift b/Sources/CodeGen/LLVM/IntegerPredicate.swift index 2cc1e8806..5ad4ba1ad 100644 --- a/Sources/CodeGen/LLVM/IntegerPredicate.swift +++ b/Sources/CodeGen/LLVM/IntegerPredicate.swift @@ -1,5 +1,5 @@ -import Core import LLVM +import Core extension LLVM.IntegerPredicate { public init(_ p: Core.IntegerPredicate) { diff --git a/Sources/CodeGen/LLVM/OverflowBehavior.swift b/Sources/CodeGen/LLVM/OverflowBehavior.swift index e565985b9..090a75902 100644 --- a/Sources/CodeGen/LLVM/OverflowBehavior.swift +++ b/Sources/CodeGen/LLVM/OverflowBehavior.swift @@ -1,12 +1,12 @@ -import Core import LLVM +import Core extension LLVM.OverflowBehavior { public init(_ ob: Core.OverflowBehavior) { - self = switch ob { - case .ignore: .ignore - case .nuw: .nuw - case .nsw: .nsw + switch ob { + case .ignore: self = OverflowBehavior.ignore + case .nuw: self = OverflowBehavior.nuw + case .nsw: self = OverflowBehavior.nsw } } }