Skip to content

Commit

Permalink
Implement missing case in LLVM matchArg function for array values.
Browse files Browse the repository at this point in the history
Fixes #701.
  • Loading branch information
Brian Huffman committed May 18, 2020
1 parent 0860175 commit 32f53e2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/SAWScript/Crucible/LLVM/Override.hs
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,12 @@ matchArg opts sc cc cs prepost actual expectedTy expected = do
realTerm <- valueToSC sym (cs ^. MS.csLoc) failMsg tval actual
matchTerm sc cc (cs ^. MS.csLoc) prepost realTerm (ttTerm expectedTT)

-- match arrays point-wise
(Crucible.LLVMValArray _ xs, Crucible.ArrayType _len y, SetupArray () zs) ->
sequence_
[ matchArg opts sc cc cs prepost x y z
| (x, z) <- zip (V.toList xs) zs ]

-- match the fields of struct point-wise
(Crucible.LLVMValStruct xs, Crucible.StructType fields, SetupStruct () _ zs) ->
sequence_
Expand Down

0 comments on commit 32f53e2

Please sign in to comment.