[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 24 05:51:15 PDT 2022
Anastasia 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>())
----------------
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.
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