Skip to content

Commit

Permalink
conv:abi: Handle function declarations.
Browse files Browse the repository at this point in the history
  • Loading branch information
lkorenc committed Feb 2, 2024
1 parent f117e59 commit eb06f80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/vast/Conversion/ABI/EmitABI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ namespace vast
// Copying visibility from the original function results in error?
wrapper.setVisibility(mlir::SymbolTable::Visibility::Private);

mk_prologue(wrapper);
if (!op.getBody().empty())
mk_prologue(wrapper);

return wrapper;
}
Expand Down Expand Up @@ -805,9 +806,8 @@ namespace vast

auto should_transform = [&](hl::FuncOp op)
{
// TODO(abi): Due to some issues with location info of arguments
// declaration are not yet supported.
return op.getName() == "main" && !op.isDeclaration();
// TODO(conv:abi): We should always emit main with a fixed type.
return op.getName() == "main";
};

target.addDynamicallyLegalOp< hl::FuncOp >(should_transform);
Expand Down

0 comments on commit eb06f80

Please sign in to comment.