Skip to content

[HLSL] main is just a function #110517

Closed
@llvm-beanz

Description

@llvm-beanz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HLSLHLSL Language Supportclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions