Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HLSL] main is just a function #110517

Open
llvm-beanz opened this issue Sep 30, 2024 · 0 comments · May be fixed by #110546
Open

[HLSL] main is just a function #110517

llvm-beanz opened this issue Sep 30, 2024 · 0 comments · May be fixed by #110546
Labels
HLSL HLSL Language Support

Comments

@llvm-beanz
Copy link
Collaborator

HLSL gives no special meaning to the function named main. It does give special handling to entry points, and the active entry point when building a freestanding shader. Those cases are handled by the HLSLShader attribute, which can be implicitly applied to main if no other entry is specified, rather than the function name.

@llvm-beanz llvm-beanz added the HLSL HLSL Language Support label Sep 30, 2024
llvm-beanz added a commit to llvm-beanz/llvm-project that referenced this issue Sep 30, 2024
HLSL doesn't distinguish `main` from any other function. It does treat
entry points special, but they're not required to be called `main` so
we have a different attribute annotation to mark them.

At the moment this change really just changes the mangling of functions
named `main` in the Itanium mangling.

Fixes llvm#110517
@llvm-beanz llvm-beanz linked a pull request Sep 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HLSL HLSL Language Support
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant