[clang] [llvm] [HLSL][RootSignature] Add metadata generation for descriptor tables (PR #139633)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Thu May 15 11:14:36 PDT 2025
================
@@ -423,6 +437,14 @@ void CGHLSLRuntime::emitEntryFunction(const FunctionDecl *FD,
// FIXME: Handle codegen for return type semantics.
// See: https://github.com/llvm/llvm-project/issues/57875
B.CreateRetVoid();
+
+ // Add and identify root signature to function, if applicable
+ const AttrVec &Attrs = FD->getAttrs();
+ for (const Attr *Attr : Attrs) {
----------------
bogner wrote:
I don't think naming `Attrs` is doing much here, probably simpler just to call the function in the loop header
```suggestion
for (const Attr *Attr : FD->getAttrs()) {
```
https://github.com/llvm/llvm-project/pull/139633
More information about the cfe-commits
mailing list