Skip to content

Commit

Permalink
Do not support opaque pointers in type skeletons for now
Browse files Browse the repository at this point in the history
See #1877 for further discussion.
  • Loading branch information
RyanGlScott committed Jun 1, 2023
1 parent 5f99422 commit b927837
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/SAWScript/Crucible/LLVM/Skeleton.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ makeLenses ''ModuleSkeleton

parseType :: LLVM.Type -> IO TypeSkeleton
parseType (LLVM.PtrTo t) = pure $ TypeSkeleton t True [SizeGuess 1 True "default guess of size 1"]
-- It is unclear how to combine opaque pointers with type skeletons due to the
-- lack of a pointee type. For now, we simply fail if we encounter one
-- (see #1877).
parseType LLVM.PtrOpaque = fail $ unlines
[ "Skeleton generation does not support opaque pointers."
, "You should report this issue at: https://github.com/GaloisInc/saw-script/issues/1877"
]
parseType (LLVM.Array i t) = pure $ TypeSkeleton t True
[ SizeGuess (fromIntegral i) True $ "default guess of size " <> Text.pack (show i)
]
Expand Down

0 comments on commit b927837

Please sign in to comment.