Skip to content

[HLSL] inout/out ABI for array parameters #106917

@llvm-beanz

Description

@llvm-beanz

Basic inout and out parameter support is landed, however it doesn't currently work with ArrayParameterType arguments.

The following code should compile successfully:

void increment(inout int Arr[10]) {
  for (int I = 0; I < 10; I++)
    Arr[0] += 2;
}

export int call() {
  int A[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  increment(A);
  return A[0];
}

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Supportclang:codegenIR generation bugs: mangling, exceptions, etc.clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions