[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.
Xiang Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 24 10:36:07 PDT 2022
python3kgae added inline comments.
================
Comment at: clang/lib/AST/Mangle.cpp:138
+ // HLSL shader entry function never need to be mangled.
+ if (getASTContext().getLangOpts().HLSL && D->hasAttr<HLSLShaderAttr>())
----------------
Anastasia wrote:
> Does HLSL shader entry inherits the same behavior as C-linkage functions (extern C) e.g. they can't be overloaded, templated, etc? If that's the case it might be easier to add C-linkage to it during parsing and then you can inherit the rest of logic including excluding it from mangling... This is how we implement kernel function handling in clang for OpenCL.
Yes. It is like kernel for OpenCL.
I'll change to extern C.
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