================ @@ -232,6 +232,41 @@ class HLSLAnnotationAttr : public InheritableAttr { } }; +class HLSLSemanticAttr : public HLSLAnnotationAttr { + unsigned SemanticIndex : 30; + LLVM_PREFERRED_TYPE(bool) + unsigned SemanticIndexable : 1; ---------------- llvm-beanz wrote:
Do we need to store this at all? Isn't this a static property we can define from the semantic type itself? User defined semantics are always indexable and system values may or may not be based on which system value they refer to. At the moment that's a unique attribute type, but even if we instead make it an enum on the `HLSLSemanticAttr` we could just have a switch statement that returns `false` for the handful of cases that aren't indexable and `true` for everything else. https://github.com/llvm/llvm-project/pull/152537 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits