[all-commits] [llvm/llvm-project] 3f33c4: [Clang][HLSL] Add environment parameter to availab...

Helena Kotas via All-commits all-commits at lists.llvm.org
Sun May 19 10:46:34 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3f33c4c14e79e68007cf1460e4a0e606eb199da5
      https://github.com/llvm/llvm-project/commit/3f33c4c14e79e68007cf1460e4a0e606eb199da5
  Author: Helena Kotas <hekotas at microsoft.com>
  Date:   2024-05-19 (Sun, 19 May 2024)

  Changed paths:
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Basic/AttrDocs.td
    M clang/include/clang/Basic/DiagnosticParseKinds.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Parse/Parser.h
    M clang/include/clang/Sema/ParsedAttr.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/DeclBase.cpp
    M clang/lib/Headers/hlsl/hlsl_intrinsics.h
    M clang/lib/Index/CommentToXML.cpp
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Sema/SemaAPINotes.cpp
    M clang/lib/Sema/SemaAvailability.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/test/Parser/attr-availability.c
    M clang/test/Sema/attr-availability-ios.c
    A clang/test/SemaHLSL/Availability/attr-availability-compute.hlsl
    A clang/test/SemaHLSL/Availability/attr-availability-errors.hlsl
    A clang/test/SemaHLSL/Availability/attr-availability-mesh.hlsl
    A clang/test/SemaHLSL/Availability/attr-availability-pixel.hlsl
    R clang/test/SemaHLSL/AvailabilityMarkup.hlsl
    M clang/test/SemaHLSL/WaveBuiltinAvailability.hlsl

  Log Message:
  -----------
  [Clang][HLSL] Add environment parameter to availability attribute (#89809)

Add `environment` parameter to Clang availability attribute. The allowed
values for this parameter are a subset of values allowed in the
`llvm::Triple` environment component. If the `environment` parameters is
present, the declared availability attribute applies only to targets
with the same platform and environment.

This new parameter will be initially used for annotating HLSL functions
for the `shadermodel` platform because in HLSL built-in function
availability can depend not just on the shader model version (mapped to
`llvm::Triple::OSType`) but also on the target shader stage (mapped to
`llvm::Triple::EnvironmentType`). See example in #89802 and
microsoft/hlsl-specs#204 for more details.

The environment parameter is currently supported only for HLSL.

Fixes #89802



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list