diff --git a/reopt/Main_reopt.hs b/reopt/Main_reopt.hs index 23f19d09..c5da08ed 100644 --- a/reopt/Main_reopt.hs +++ b/reopt/Main_reopt.hs @@ -727,8 +727,9 @@ showConstraints args elfPath = do mr <- runReoptM printLogEvent $ do hdrAnn <- resolveHeader (headerPath args) (clangPath args) - let funPrefix :: BSC.ByteString - funPrefix = unnamedFunPrefix args + let + funPrefix :: BSC.ByteString + funPrefix = unnamedFunPrefix args (os, initState) <- reoptX86Init (loadOptions args) rOpts origElf let symAddrMap = initDiscSymAddrMap initState @@ -835,8 +836,9 @@ performReopt args elfPath = do mr <- runReoptM logger2 $ do hdrAnn <- resolveHeader (headerPath args) (clangPath args) - let funPrefix :: BSC.ByteString - funPrefix = unnamedFunPrefix args + let + funPrefix :: BSC.ByteString + funPrefix = unnamedFunPrefix args (os, initState) <- reoptX86Init (loadOptions args) rOpts origElf let symAddrMap = initDiscSymAddrMap initState @@ -889,12 +891,13 @@ performReopt args elfPath = do (traceConstraintOrigins args) -- FIXME: move - let prettyDefs = - [ PP.pretty n PP.<+> "=" PP.<+> PP.pretty ty - | (n, ty) <- mcNamedTypes moduleConstraints - ] - prettyWarnings = - ["# Warning: " <> PP.viaShow w | w <- mcWarnings moduleConstraints] + let + prettyDefs = + [ PP.pretty n PP.<+> "=" PP.<+> PP.pretty ty + | (n, ty) <- mcNamedTypes moduleConstraints + ] + prettyWarnings = + ["# Warning: " <> PP.viaShow w | w <- mcWarnings moduleConstraints] case typedFnsExportPath args of Nothing -> pure () @@ -932,16 +935,17 @@ performReopt args elfPath = do Right _ -> do funStepFinished AnnotationGeneration fid () - let vcgAnn :: Ann.ModuleAnnotations - vcgAnn = - Ann.ModuleAnnotations - { Ann.llvmFilePath = llvmPath - , Ann.binFilePath = elfPath - , Ann.pageSize = 4096 - , Ann.stackGuardPageCount = 1 - , Ann.functions = rights (snd <$> ann) - , Ann.extFunctions = ext - } + let + vcgAnn :: Ann.ModuleAnnotations + vcgAnn = + Ann.ModuleAnnotations + { Ann.llvmFilePath = llvmPath + , Ann.binFilePath = elfPath + , Ann.pageSize = 4096 + , Ann.stackGuardPageCount = 1 + , Ann.functions = rights (snd <$> ann) + , Ann.extFunctions = ext + } reoptWriteByteString AnnotationsFileType annPath (Aeson.encode vcgAnn) funStepAllFinished AnnotationGeneration ()