summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-11-19 12:43:28 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-14 20:53:51 -0500
commit4f654071850e211370199dddefffbe4a85cd6040 (patch)
tree9289ac5d0bace8b08af91167f835ed06d6847a41
parent82c39f4df38a32c93b3be5aa428dedf5d6bf66f4 (diff)
downloadhaskell-4f654071850e211370199dddefffbe4a85cd6040.tar.gz
compiler: Drop `Maybe ModLocation` from T_MergeForeign
This field was entirely unused.
-rw-r--r--compiler/GHC/Driver/Pipeline.hs6
-rw-r--r--compiler/GHC/Driver/Pipeline/Execute.hs8
-rw-r--r--compiler/GHC/Driver/Pipeline/Phases.hs2
3 files changed, 8 insertions, 8 deletions
diff --git a/compiler/GHC/Driver/Pipeline.hs b/compiler/GHC/Driver/Pipeline.hs
index 8645184b1f..92782176b2 100644
--- a/compiler/GHC/Driver/Pipeline.hs
+++ b/compiler/GHC/Driver/Pipeline.hs
@@ -569,7 +569,7 @@ doLink hsc_env o_files =
--
-- The object file created by compiling the _stub.c file is put into a
-- temporary file, which will be later combined with the main .o file
--- (see the MergeForeigns phase).
+-- (see the MergeForeign phase).
--
-- Moreover, we also let the user emit arbitrary C/C++/ObjC/ObjC++ files
-- from TH, that are then compiled and linked to the module. This is
@@ -763,7 +763,7 @@ hscGenBackendPipeline pipe_env hsc_env mod_sum result = do
Nothing -> return mlinkable
Just o_fp -> do
unlinked_time <- liftIO (liftIO getCurrentTime)
- final_o <- use (T_MergeForeign pipe_env hsc_env (Just location) o_fp fos)
+ final_o <- use (T_MergeForeign pipe_env hsc_env o_fp fos)
let !linkable = LM unlinked_time
(ms_mod mod_sum)
[DotO final_o]
@@ -810,7 +810,7 @@ cmmPipeline pipe_env hsc_env input_fn = do
mo_fn <- hscPostBackendPipeline pipe_env hsc_env HsSrcFile (backend (hsc_dflags hsc_env)) Nothing output_fn
case mo_fn of
Nothing -> panic "CMM pipeline - produced no .o file"
- Just mo_fn -> use (T_MergeForeign pipe_env hsc_env Nothing mo_fn fos)
+ Just mo_fn -> use (T_MergeForeign pipe_env hsc_env mo_fn fos)
hscPostBackendPipeline :: P m => PipeEnv -> HscEnv -> HscSource -> Backend -> Maybe ModLocation -> FilePath -> m (Maybe FilePath)
hscPostBackendPipeline _ _ HsBootFile _ _ _ = return Nothing
diff --git a/compiler/GHC/Driver/Pipeline/Execute.hs b/compiler/GHC/Driver/Pipeline/Execute.hs
index 95d2c35a0c..cc74b2f3f4 100644
--- a/compiler/GHC/Driver/Pipeline/Execute.hs
+++ b/compiler/GHC/Driver/Pipeline/Execute.hs
@@ -143,8 +143,8 @@ runPhase (T_LlvmLlc pipe_env hsc_env input_fn) =
runLlvmLlcPhase pipe_env hsc_env input_fn
runPhase (T_LlvmMangle pipe_env hsc_env input_fn) =
runLlvmManglePhase pipe_env hsc_env input_fn
-runPhase (T_MergeForeign pipe_env hsc_env location input_fn fos) =
- runMergeForeign pipe_env hsc_env location input_fn fos
+runPhase (T_MergeForeign pipe_env hsc_env input_fn fos) =
+ runMergeForeign pipe_env hsc_env input_fn fos
runLlvmManglePhase :: PipeEnv -> HscEnv -> FilePath -> IO [Char]
runLlvmManglePhase pipe_env hsc_env input_fn = do
@@ -154,8 +154,8 @@ runLlvmManglePhase pipe_env hsc_env input_fn = do
llvmFixupAsm (targetPlatform dflags) input_fn output_fn
return output_fn
-runMergeForeign :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> [FilePath] -> IO FilePath
-runMergeForeign _pipe_env hsc_env _location input_fn foreign_os = do
+runMergeForeign :: PipeEnv -> HscEnv -> FilePath -> [FilePath] -> IO FilePath
+runMergeForeign _pipe_env hsc_env input_fn foreign_os = do
if null foreign_os
then return input_fn
else do
diff --git a/compiler/GHC/Driver/Pipeline/Phases.hs b/compiler/GHC/Driver/Pipeline/Phases.hs
index 415d29147d..d689e1e266 100644
--- a/compiler/GHC/Driver/Pipeline/Phases.hs
+++ b/compiler/GHC/Driver/Pipeline/Phases.hs
@@ -46,7 +46,7 @@ data TPhase res where
T_LlvmOpt :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
T_LlvmLlc :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
T_LlvmMangle :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
- T_MergeForeign :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> [FilePath] -> TPhase FilePath
+ T_MergeForeign :: PipeEnv -> HscEnv -> FilePath -> [FilePath] -> TPhase FilePath
-- | A wrapper around the interpretation function for phases.
data PhaseHook = PhaseHook (forall a . TPhase a -> IO a)