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

Add export keyword to HLSL language spec #268

Merged
merged 4 commits into from
Jun 26, 2024

Conversation

hekota
Copy link
Member

@hekota hekota commented Jun 26, 2024

Add export keyword to HLSL language specs.

The spec describes two ways the export keyword can be used.

  1. On individual function declarations
export void f() {}
  1. On a group of function declaration:
export {
   void f1();
   void f2() {}
}

DXC currently supports only the first case, but since Clang has support for both, we might as well support it in HLSL 202y too.

This spec update does not yet include detailed rules for when a function can or cannot be exported, such as when it has resource argument or semantic annotations. That will be covered by llvm/llvm-project#93330.

This change also adds more sections under Declarations (based on C++ spec layout).

Contributes to: llvm/llvm-project#92812

@hekota
Copy link
Member Author

hekota commented Jun 26, 2024

image
image

specs/language/declarations.tex Outdated Show resolved Hide resolved
specs/language/declarations.tex Outdated Show resolved Hide resolved
@bob80905
Copy link
Collaborator

For completion, do you also want to define function-declaration ? It doesn't have a grammar definition.

@hekota
Copy link
Member Author

hekota commented Jun 26, 2024

For completion, do you also want to define function-declaration ? It doesn't have a grammar definition.

I believe that is beyond the scope of the task llvm/llvm-project#92812.

@hekota hekota merged commit b7e99e2 into microsoft:main Jun 26, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants