[clang] [llvm] [HLSL][SPIR-V] Implement vk::ext_builtin_input attribute (PR #138530)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 09:59:44 PDT 2025


Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/138530 at github.com>


================
@@ -140,6 +140,11 @@ def SharedVar : SubsetSubject<Var,
                               [{S->hasGlobalStorage() && !S->getTLSKind()}],
                               "global variables">;
 
+def HLSLInputBuiltin : SubsetSubject<Var, [{S->hasGlobalStorage() &&
+                    S->getStorageClass()==StorageClass::SC_Static &&
+                    S->getType().isConstQualified()}],
+                                     "static const globals">;
----------------
bogner wrote:

Spacing looks a little funny here. Did you know that clang-format (mostly) works on .td files? It's a bit tricky to use here since the file as a whole isn't clang-format clean, but I get the following:
```suggestion
def HLSLInputBuiltin
    : SubsetSubject<Var, [{S->hasGlobalStorage() &&
                           S->getStorageClass() == StorageClass::SC_Static &&
                           S->getType().isConstQualified()}],
                    "static const globals">;
```

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


More information about the llvm-commits mailing list