Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ptival committed Aug 11, 2023
1 parent 67ecdb8 commit 71f5486
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions reopt/Main_reopt.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 ()
Expand Down Expand Up @@ -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 ()

Expand Down

0 comments on commit 71f5486

Please sign in to comment.