Skip to content

Commit

Permalink
Allow llvm_assert_eq to apply to arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Tomb committed Apr 14, 2016
1 parent 5291c25 commit cf0e50f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/SAWScript/LLVMMethodSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,12 @@ initializeVerification' sc ir = do
-- until later to initialize the fields.
argAssignments' <- forM argAssignments $ \(expr, mle) ->
case (expr, mle) of
(CC.Term (TC.Arg _ _ _), Just _) ->
fail "argument assignments not allowed"
(CC.Term (TC.Arg _ _ _), Just le) -> do
ps <- fromMaybe (error "initializeVerification: arg with value") <$> getPath
tm <- useLogicExprPS ir sc ps [] le
return (Just (expr, tm))
(CC.Term (TC.Arg _ _ ty), Nothing) -> do
ps <- fromMaybe (error "initializeVerification") <$> getPath
ps <- fromMaybe (error "initializeVerification: arg w/o value") <$> getPath
(tm, ps') <- liftIO $ createLogicValue cb sbe sc expr ps ty mle
setPS ps'
return (Just (expr, tm))
Expand Down

0 comments on commit cf0e50f

Please sign in to comment.