================
@@ -12937,6 +12937,10 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
if (D->hasAttr<WeakRefAttr>())
return false;
+ if (LangOpts.SYCLIsDevice && !D->hasAttr<SYCLKernelEntryPointAttr>() &&
+ !D->hasAttr<SYCLExternalAttr>())
----------------
erichkeane wrote:
I understood what you meant, and strongly disagree. This is highly unreadable
and requires grok'ing the entire function to understand the purpose here, and
is more likely to result in future patches breaking this. A more 'surgical'
approach here would be 'more correct'. What I proposed above is, as far as I
can tell, EXACTLY this functionally, but less likely to be broken in the future.
https://github.com/llvm/llvm-project/pull/140282
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits