[clang] [HLSL] Support packoffset attribute in AST (PR #89836)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Wed May 1 11:41:13 PDT 2024
================
@@ -4372,6 +4372,13 @@ def HLSLResourceBinding: InheritableAttr {
let Documentation = [HLSLResourceBindingDocs];
}
+def HLSLPackOffset: HLSLAnnotationAttr {
+ let Spellings = [HLSLAnnotation<"packoffset">];
+ let LangOpts = [HLSL];
+ let Args = [IntArgument<"Offset">];
----------------
llvm-beanz wrote:
Looking at this more this seems really weird to me. The argument isn't actually an integer, it's a special string. You're parsing it to an integer, but that actually loses some fidelity.
We should probably store index and sub-component values in the attribute rather than collapsing it down into one value.
https://github.com/llvm/llvm-project/pull/89836
More information about the cfe-commits
mailing list