Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
jackalcooper committed Oct 27, 2024
1 parent edf3df7 commit 8127533
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 0 additions & 10 deletions lib/charms/defm/expander.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1129,16 +1129,6 @@ defmodule Charms.Defm.Expander do
{{dialect, _, _}, op, args} = Macro.decompose_call(call)
op = "#{dialect}.#{op}"
{args, state, env} = expand(args, state, env)

return_types =
for t <- List.flatten(return_types) do
if is_bitstring(t) do
MLIR.Type.get(t, ctx: state.mlir.ctx)
else
t
end
end

{return_types, state, env} = expand(return_types, state, env)

return_types =
Expand Down
3 changes: 2 additions & 1 deletion lib/charms/pointer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ defmodule Charms.Pointer do
@moduledoc """
Intrinsic module to work with pointers.
"""
alias Charms.Pointer
use Charms.Intrinsic
alias Beaver.MLIR.{Type, Attribute}
alias Beaver.MLIR.Dialect.{Arith, LLVM, Index}
Expand Down Expand Up @@ -45,7 +46,7 @@ defmodule Charms.Pointer do

quote do
size = unquote(cast)
value llvm.alloca(size, elem_type: unquote(elem_type)) :: "!llvm.ptr"
value llvm.alloca(size, elem_type: unquote(elem_type)) :: Pointer.t()
end
end

Expand Down

0 comments on commit 8127533

Please sign in to comment.