[PATCH] D158803: [Sema][HLSL] Consolidate handling of HLSL attributes
Justin Bogner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 24 18:25:11 PDT 2023
bogner created this revision.
bogner added reviewers: beanz, python3kgae, bob80905, tex3d.
Herald added subscribers: Anastasia, arphaman, mcrosier.
Herald added a reviewer: aaron.ballman.
Herald added a project: All.
bogner requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This moves the sema checking of the entrypoint sensitive HLSL
attributes all into one place. This ended up being kind of large for a
couple of reasons:
- I had to move the call to CheckHLSLEntryPoint later in ActOnFunctionDeclarator so that we do this after redeclarations and have access to all of the attributes.
- We need to transfer the target shader stage onto the specified entry point before doing the checking.
- I removed "library" from the HLSLShader attribute value enum and just go through a string to convert from the triple - the other way was confusing and brittle.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158803
Files:
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/CodeGenHLSL/GlobalDestructors.hlsl
clang/test/SemaHLSL/Semantics/entry_parameter.hlsl
clang/test/SemaHLSL/Semantics/groupindex.hlsl
clang/test/SemaHLSL/entry.hlsl
clang/test/SemaHLSL/entry_shader.hlsl
clang/test/SemaHLSL/entry_shader_redecl.hlsl
clang/test/SemaHLSL/num_threads.hlsl
clang/test/SemaHLSL/shader_type_attr.hlsl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158803.553325.patch
Type: text/x-patch
Size: 28168 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230825/f41b0ebf/attachment-0001.bin>
More information about the cfe-commits
mailing list