[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 26 11:09:41 PDT 2022


Anastasia added inline comments.


================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:54
+
+void clang::CodeGen::CGHLSLRuntime::setHLSLFnuctionAttributes(
+    llvm::Function *F, const FunctionDecl *FD) {
----------------
I don't think you need `clang::CodeGen::`?


================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.h:39
+
+  void setHLSLFnuctionAttributes(llvm::Function *, const FunctionDecl *);
 };
----------------
typo: `setHLSLFnuctionAttributes` -> `setHLSLFunctionAttributes`


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1654
+  if (getLangOpts().HLSL) {
+    if (const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(GD.getDecl()))
+      getHLSLRuntime().setHLSLFnuctionAttributes(F, FD);
----------------
I think all attributes are expected to be added in `ConstructAttributeList`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124752



More information about the cfe-commits mailing list