Skip to content

Commit

Permalink
Update create_absent_func.ex
Browse files Browse the repository at this point in the history
  • Loading branch information
jackalcooper committed Oct 8, 2024
1 parent ceff98e commit dc79a22
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/charms/defm/pass/create_absent_func.ex
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,17 @@ defmodule Charms.Defm.Pass.CreateAbsentFunc do
name_str <- MLIR.StringRef.to_string(name),
false <- MapSet.member?(created, name_str) do
mlir ctx: ctx, block: block do
ft =
{arg_types, ret_types} =
if s = Beaver.ENIF.signature(ctx, String.to_atom(name_str)) do
{arg_types, ret_types} = s
Type.function(arg_types, ret_types)
s
else
Type.function(arg_types, ret_types)
{arg_types, ret_types}
end

Func.func _(
sym_name: MLIR.Attribute.string(name_str),
sym_visibility: MLIR.Attribute.string("private"),
function_type: ft
function_type: Type.function(arg_types, ret_types)
) do
region do
end
Expand Down

0 comments on commit dc79a22

Please sign in to comment.