[clang] [HLSL] Rewrite semantics parsing (PR #152537)

Nathan Gauër via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 25 05:38:13 PDT 2025


================
@@ -232,6 +232,41 @@ class HLSLAnnotationAttr : public InheritableAttr {
   }
 };
 
+class HLSLSemanticAttr : public HLSLAnnotationAttr {
+  unsigned SemanticIndex : 30;
+  LLVM_PREFERRED_TYPE(bool)
+  unsigned SemanticIndexable : 1;
----------------
Keenuts wrote:

I wanted specifically to avoid having the indexing logic somewhere else in the code: make the TD file defines the rules allowed for a given semantic. But we could also do this as you suggested. I'll reserve this change to the refactoring of the conditions (like what value is allowed for what semantic, etc)

https://github.com/llvm/llvm-project/pull/152537


More information about the cfe-commits mailing list