Skip to content
This repository was archived by the owner on Jun 19, 2026. It is now read-only.

Backend cleanup stepwise#53

Merged
itsfuad merged 4 commits into
mainfrom
backend-cleanup-stepwise
Apr 22, 2026
Merged

Backend cleanup stepwise#53
itsfuad merged 4 commits into
mainfrom
backend-cleanup-stepwise

Conversation

@itsfuad

@itsfuad itsfuad commented Apr 21, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

}
decl, err := llvmExternDecl(state, fn)
if err != nil {
return nil, err

Copilot AI Apr 21, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

collectModuleExternDecls now propagates errors from llvmExternDecl. llvmExternDecl can fail when it can't map an extern's return type to an LLVM type (e.g., missing layout / unsupported type), but the previous inlined logic here explicitly fell back to declaring the return type as ptr rather than failing the whole lowering pass. Consider preserving that behavior by handling llvmExternDecl errors with a safe fallback (or updating llvmExternDecl to never error and instead return a ptr/void declaration).

Suggested change
return nil, err
decl = fmt.Sprintf("declare ptr @%s(...)", sym)

Copilot uses AI. Check for mistakes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@itsfuad itsfuad merged commit f8d04d5 into main Apr 22, 2026
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants