[PATCH] D25541: [CUDA] Emit deferred diagnostics during Sema rather than during codegen.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 13 11:42:51 PDT 2016


jlebar marked 2 inline comments as done.
jlebar added a comment.

In https://reviews.llvm.org/D25541#569360, @rnk wrote:

> Nice! Looks like this wasn't too bad.


Like many things in my life lately, it wasn't after Richard explained to me how to do it.   :)

Thank you for the review.



================
Comment at: clang/lib/Sema/SemaCUDA.cpp:546
+  // Externally-visible and similar functions are always emitted.
+  if (S.getASTContext().GetGVALinkageForFunction(FD) > GVA_DiscardableODR)
+    return true;
----------------
rnk wrote:
> There are two other instances of conditions equivalent to this in `ASTContext::DeclMustBeEmitted`. You should add a predicate like `isDiscardableGVALinkage(GVALinkage)` to Linkage.h and call it in `DeclMustBeEmitted`.
Sure, let me do that in a separate patch, https://reviews.llvm.org/D25571.


https://reviews.llvm.org/D25541





More information about the cfe-commits mailing list