From 71f5486e4163592fbb598c2c576ee558209ea385 Mon Sep 17 00:00:00 2001 From: Valentin Robert Date: Fri, 11 Aug 2023 16:09:30 -0700 Subject: [PATCH] fix formatting --- reopt/Main_reopt.hs | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) 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 ()