[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)
Damyan Pepper via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 10 21:48:35 PDT 2024
================
@@ -280,13 +280,15 @@ void CGHLSLRuntime::annotateHLSLResource(const VarDecl *D, GlobalVariable *GV) {
const auto *RD = Ty->getAsCXXRecordDecl();
if (!RD)
return;
- const auto *Attr = RD->getAttr<HLSLResourceAttr>();
- if (!Attr)
+ const auto *HLSLResAttr = RD->getAttr<HLSLResourceAttr>();
+ const auto *HLSLResClassAttr = RD->getAttr<HLSLResourceClassAttr>();
+ if (!HLSLResAttr || !HLSLResClassAttr)
return;
- llvm::hlsl::ResourceClass RC = Attr->getResourceClass();
- llvm::hlsl::ResourceKind RK = Attr->getResourceKind();
- bool IsROV = Attr->getIsROV();
+ llvm::hlsl::ResourceClass RC = HLSLResClassAttr->getResourceClass();
+ ;
----------------
damyanp wrote:
Stray `;`
```suggestion
```
https://github.com/llvm/llvm-project/pull/98419
More information about the cfe-commits
mailing list