[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

Xiang Li via cfe-commits cfe-commits at lists.llvm.org
Wed May 1 11:54:41 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">];
----------------
python3kgae wrote:

Information lost is the difference between 'c0' and 'c',  'xyzw' and 'rgba'.
If we want to keep that, they'll need to be kept these as string.
Then we'll need to parse the string when using the value as integer.

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


More information about the cfe-commits mailing list