summaryrefslogtreecommitdiff
path: root/compiler/GHC/Cmm/Switch.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Cmm/Switch.hs')
-rw-r--r--compiler/GHC/Cmm/Switch.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/GHC/Cmm/Switch.hs b/compiler/GHC/Cmm/Switch.hs
index b8d7456b37..ee0d5a07df 100644
--- a/compiler/GHC/Cmm/Switch.hs
+++ b/compiler/GHC/Cmm/Switch.hs
@@ -8,14 +8,14 @@ module GHC.Cmm.Switch (
switchTargetsToList, eqSwitchTargetWith,
SwitchPlan(..),
- targetSupportsSwitch,
+ backendSupportsSwitch,
createSwitchPlan,
) where
import GHC.Prelude
import GHC.Utils.Outputable
-import GHC.Driver.Session
+import GHC.Driver.Backend
import GHC.Cmm.Dataflow.Label (Label)
import Data.Maybe
@@ -316,12 +316,12 @@ and slowed down all other cases making it not worthwhile.
-}
--- | Does the target support switch out of the box? Then leave this to the
--- target!
-targetSupportsSwitch :: HscTarget -> Bool
-targetSupportsSwitch HscC = True
-targetSupportsSwitch HscLlvm = True
-targetSupportsSwitch _ = False
+-- | Does the backend support switch out of the box? Then leave this to the
+-- backend!
+backendSupportsSwitch :: Backend -> Bool
+backendSupportsSwitch ViaC = True
+backendSupportsSwitch LLVM = True
+backendSupportsSwitch _ = False
-- | This function creates a SwitchPlan from a SwitchTargets value, breaking it
-- down into smaller pieces suitable for code generation.