Skip to content

Commit

Permalink
crucible-llvm: Generalize the ext of SomeLLVMOverride
Browse files Browse the repository at this point in the history
  • Loading branch information
langston-barrett committed Mar 21, 2024
1 parent e13f1e4 commit c2cf4c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions crucible-llvm/src/Lang/Crucible/LLVM/Intrinsics/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ data LLVMOverride p sym ext args ret =
-- (@OverrideSim@).
}

data SomeLLVMOverride p sym =
forall args ret. SomeLLVMOverride (LLVMOverride p sym LLVM args ret)
data SomeLLVMOverride p sym ext =
forall args ret. SomeLLVMOverride (LLVMOverride p sym ext args ret)

-- | Convenient LLVM representation of the @size_t@ type.
llvmSizeT :: HasPtrWidth wptr => L.Type
Expand Down Expand Up @@ -292,15 +292,15 @@ build_llvm_override fnm args ret args' ret' llvmOverride =
polymorphic1_llvm_override :: forall p sym arch wptr l a rtp.
(IsSymInterface sym, HasLLVMAnn sym, HasPtrWidth wptr) =>
String ->
(forall w. (1 <= w) => NatRepr w -> SomeLLVMOverride p sym) ->
(forall w. (1 <= w) => NatRepr w -> SomeLLVMOverride p sym LLVM) ->
OverrideTemplate p sym arch rtp l a
polymorphic1_llvm_override prefix fn =
OverrideTemplate (PrefixMatch prefix) (register_1arg_polymorphic_override prefix fn)

register_1arg_polymorphic_override :: forall p sym arch wptr l a rtp.
(IsSymInterface sym, HasLLVMAnn sym, HasPtrWidth wptr) =>
String ->
(forall w. (1 <= w) => NatRepr w -> SomeLLVMOverride p sym) ->
(forall w. (1 <= w) => NatRepr w -> SomeLLVMOverride p sym LLVM) ->
RegOverrideM p sym arch rtp l a ()
register_1arg_polymorphic_override prefix overrideFn =
do (L.Declare{ L.decName = L.Symbol nm },_,_) <- ask
Expand Down
4 changes: 2 additions & 2 deletions crucible-llvm/src/Lang/Crucible/LLVM/Intrinsics/Libcxx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ register_cpp_override someCPPOverride =
data SomeCPPOverride p sym arch =
SomeCPPOverride
{ cppOverrideSubstrings :: [String]
, cppOverrideAction :: L.Declare -> ABI.DecodedName -> LLVMContext arch -> Maybe (SomeLLVMOverride p sym)
, cppOverrideAction :: L.Declare -> ABI.DecodedName -> LLVMContext arch -> Maybe (SomeLLVMOverride p sym LLVM)
}

------------------------------------------------------------------------
Expand Down Expand Up @@ -126,7 +126,7 @@ panic_ from decl args ret =
-- function handle in the symbol table and use that to construct an override
mkOverride :: (IsSymInterface sym, HasPtrWidth (ArchWidth arch))
=> [String] -- ^ Substrings for name filtering
-> (forall args ret. L.Declare -> CtxRepr args -> TypeRepr ret -> Maybe (SomeLLVMOverride p sym))
-> (forall args ret. L.Declare -> CtxRepr args -> TypeRepr ret -> Maybe (SomeLLVMOverride p sym LLVM))
-> (L.Symbol -> ABI.DecodedName -> Bool)
-> SomeCPPOverride p sym arch
mkOverride substrings ov filt =
Expand Down

0 comments on commit c2cf4c9

Please sign in to comment.