[PATCH] D130019: [HLSL] CodeGen HLSL Resource annotations

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 26 09:50:09 PDT 2022


aaron.ballman added inline comments.


================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:59
+    return;
+  auto *RD = Ty->getAsCXXRecordDecl();
+  if (!RD)
----------------



================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:62-66
+  if (!RD->hasAttr<HLSLResourceAttr>())
+    return;
+
+  HLSLResourceAttr::ResourceClass RC =
+      Ty->getAsCXXRecordDecl()->getAttr<HLSLResourceAttr>()->getResourceType();
----------------



================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:78
+  }
+
+  auto &Ctx = CGM.getModule().getContext();
----------------
Add an assertion that `ResourceMD` is always nonnull by this point?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130019/new/

https://reviews.llvm.org/D130019



More information about the cfe-commits mailing list