Commit c21ddffb authored by dterei's avatar dterei

Show LLVM mangler and code gen passes at v2

parent aa55fdc5
......@@ -45,6 +45,7 @@ llvmCodeGen dflags h us cmms
env' = funInsert lbl llvmFunTy e
in (d,env')
in do
showPass dflags "LlVM CodeGen"
bufh <- newBufHandle h
Prt.bufLeftRender bufh $ pprLlvmHeader
ver <- (fromMaybe defaultLlvmVersion) `fmap` figureLlvmVersion dflags
......
......@@ -14,6 +14,8 @@ module LlvmMangler ( llvmFixupAsm ) where
#include "HsVersions.h"
import DynFlags ( DynFlags )
import ErrUtils ( showPass )
import LlvmCodeGen.Ppr ( infoSection )
import Control.Exception
......@@ -54,8 +56,9 @@ dollarPred = ((==) '$')
commaPred = ((==) ',')
-- | Read in assembly file and process
llvmFixupAsm :: FilePath -> FilePath -> IO ()
llvmFixupAsm f1 f2 = do
llvmFixupAsm :: DynFlags -> FilePath -> FilePath -> IO ()
llvmFixupAsm dflags f1 f2 = do
showPass dflags "LlVM Mangler"
r <- openBinaryFile f1 ReadMode
w <- openBinaryFile f2 WriteMode
ss <- readSections r w
......
......@@ -1372,7 +1372,7 @@ runPhase LlvmMangle input_fn dflags
= do
let next_phase = if dopt Opt_SplitObjs dflags then Splitter else As
output_fn <- phaseOutputFilename next_phase
io $ llvmFixupAsm input_fn output_fn
io $ llvmFixupAsm dflags input_fn output_fn
return (next_phase, output_fn)
-----------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment